Why dosent this work on mac?

It looks like it's checking for IE or Netscape only and if it doesn't fine those then it doesn't do anything.
 
This script does a really crappy job of browser detection, and in the wrong way.

Look at this:
Code:
NS6 = (document.getElementById&&!document.all)
IE = (document.all)
NS = (navigator.appName=="Netscape" && navigator.appVersion.charAt(0)=="4")

First of all, there are really few browser that support both the MS version of object access, AND the Netscape way (right now I can't think of any). So the first line is weird. Second, there can be any number of browsers that support "document.all", not just IE. Third: to actually look for a specific browser by name and version number is the most stupid thing to do, by far. At least on a public page (there might be instances on sites with specific security needs where I might be tempted not to villify the designer for doing so, but I doubt it).

Now, go read this page:
http://www.quirksmode.org/js/support.html

When you're done, open the script files and change them to use the methods you've just learned. Not only will they work, but you will also be wiser...:D
 
On a side note, but somewhat related to this:

Dynamic Drive has been around for a while...I can remember it as far back as 1996, at least. They were never very 'compatible' in their scripts, especially back then. If you do decide to use a script wrote by them or submitted to them, chances are it's going to have issues. They were at one time a very IE centric place.
 
mw84, it looks like he's changed some things since his original post.
 
Back
Top