Hi everyone. I, like the majority of us web developer's, despise internet explorer. So on my site, i want to put something in just for the fun of it that detects IE and says something. Right now i have just a plain alert asking to please change to a different web browser. I want to have it say something like, P.S. this web browser will self-destruct in 5 seconds. And then have a countdown or something. I don't know, I just want some ideas and how to accomplish them with java and php. Thanks guys (and gals).

The BrowserDetect.browser and BrowserDetect.version are what you are looking for, these will tell you the name and version number that the browser is reporting.

You missunderstand. It already detects the web browser and alerts them with a funny message if it's the IE. I want to make a countdown from five on the website somehow. How can i do this?

You would have to be a darn fool to discard IE6. I personally know of 350,000 employees still using it. The IT department is so afraid of Microsoft upgrades that we are stuck with it. I illegally use Firefox.

Now we know!!!!!!! Joking. How could i create a countdown from 5 on the main page?

Hi, to do that you need Conditional COmments:

<html>
  <head>
    <title>Conditional comments on IE</title>
    <style>
      p{
       font-family:verdana, arial;
       font-size:16px;
       margin:20px auto;
       background:#666;
       color:#ccc;
       padding:10px;
      }
    </style>
  </head>
 <body>
    <p>This text is available for any browser</p>

    <!--[if IE]>
    <p>This text is available ONLY in Internet Explorer </p>
    <![endif]-->

    <!--[if IE 5]>
    <p>This text is available ONLY in Internet Explorer version 5</p>
    <![endif]-->

  </body>
</html>

HTH

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.