Make your own free website on

The Omega Factor: Browser-based Messages

This script will display a different message for users of Netscape versions 2, 3, and 4 ([mis]communicator), for IE 3 and 4, WebTV, "other" browsers, and non-JavaScript-enabled browsers. Just change the indicated lines, do not change any other lines. Place the script at the point to generate the message.

You may use any characters or HTML you want in the message, with the exception of <!-- comment tags -->. You will need to use the following special characters:
  To use a single quote ('), use \' (backslash-quote)
  To use a backslash (\), use \\ (backslash-backslash)

To generate the same message for two seperate browsers, go like this:
  N3='Message for Netscape 3 and [mis]communicator'

If they come out with Netscape or IE versions 5, you can just add new lines like so (unless they change the JavaScript specs, but they probably won't...)
  WTV4='whatever' // this is assuming there isn't already a WebTV version 4...


The Script:Transload Edit

<!-- written by The Omega
// You must leave these comments in to use the script
//  (hey, I wrote it. Let me have a little credit!)
var nme=navigator.appName.toLowerCase()
var ver=navigator.appVersion
N2='I see you\'re using Netscape 2'        // <--- indicated line
N3='I see you\'re using Netscape 3'        // <--- indicated line
N4='I see you\'re using [mis]communicator' // <--- indicated line
IE3='I see you\'re using IE 3'             // <--- indicated line
IE4='I see you\'re using IE 4'             // <--- indicated line
WTV3='I see you\'re using a WebTV browser' // <--- indicated line
X='No idea what browser...'                // <--- indicated line
if (nme.indexOf("microsoft")!=-1)
if (nme.indexOf("netscape")!=-1)
if (nme.indexOf("webtv")!=-1)
<!-- The line below is also indicated -->
Hmmm... either you have a non-JavaScript capable browser or you have JavaScript disabled...