Detect if IE6 or other browser

  Chris the Ancient 20:56 28 Jul 05

I have found a bit of code which, although simple, impresses my simple brain and I've included it in a wesite I am creating.

If I open the site in Firefox, the script will run.

If I open the site in IE6 (which has every safety device known to M$ in it!) I get the banner warning me of an activex block.

Rather than terrify viewers of my site with the thought that I'm trying to do something malicious to their machine, is there a routine that I can include that inhibits the code if the browser is IE6 or enables it if the browser is not IE6.






TITLE>My title /TITLE>

META HTTP-EQUIV="Content-Type" CONTENT="text/html;CHARSET=iso-8859-1">

META NAME ="description" CONTENT ="My content">

META NAME ="keywords" CONTENT ="my meta tags">

META NAME ="revisit-after" CONTENT ="10 days">

META NAME ="robots" CONTENT="all">

script language="JavaScript1.2">

var message="A whizzy scrolling type title goes here." //specifies the title

var message=message+" " //gives a pause at the end, 1 space=1 speed unit, here I used 10 [email protected] each = 1.5seconds.

i="0" //declares the variable and sets it to start at 0

var temptitle="" //declares the variable and sets it to have no value yet.

var speed="150" //the delay in milliseconds between letters

function titler(){

if (!document.all&&!document.getElementById)

document.title=temptitle+message.charAt(i) //sets the initial title

temptitle=temptitle+message.charAt(i) //increases the title by one letter

i++ //increments the counter

if(i==message.length) //determines the end of the message


i="0" //resets the counter at the end of the message

temptitle="" //resets the title to a blank value


setTimeout("titler()",speed) //Restarts. Remove line for no-repeat.





And the rest of the page code...



  Chris the Ancient 20:57 28 Jul 05

How can I persuade the forum page to display the < at the beginning of a line?

This thread is now locked and can not be replied to.

Nintendo Switch (Nintendo NX) release date, price, specs and preview trailer: Codename NX console…

1995-2015: How technology has changed the world in 20 years

8 things designers (and brands) need to know about the modern woman

How to speed up a slow Mac: 19 great tips to make an iMac, MacBook or Mac mini run faster | Speed…