Click to See Complete Forum and Search --> : Macintosh OS 10 and OS 9 detector


arcfjss
04-15-2003, 06:01 PM
Is there a way to tell whether the person accessing a web page is using Mac OS 9 or OS 10? I have a seen posting here that would determine whether the user was on a Mac vs. a Windows box via the following code, but I need to then break the distinction for Mac down further. Thanks in advance for your help.

SCRIPT LANGUAGE="JavaScript">

page = ((navigator.platform.indexOf('Win') > -1) ? "win.html" : "mac.html");
window.location=page;
// End -->
</script>

khalidali63
04-15-2003, 06:41 PM
unless the navigator object contains this info you can't get it using javascript

use the following code to see whats the navigator object returning

alert(navigator.userAgent)

if you see Mac versioninfo you are in luck.


Cheers

Khalid