471,316 Members | 1,655 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,316 software developers and data experts.

os detection

Need help with OS detection.
I have a page with a script that works only in IE and as I heard from
feedbacks it doesn't run under IE on Mac.
I have browser type redirect script for that page that seems to be
working fine except it doesn't detect the OS ( IE on Mac just gives
blank page). Can someone add to the code that I would give me one page
for IE on Windows and another one for all others?
bName = navigator.appName;

bVer = parseInt(navigator.appVersion);

if (bName == "Microsoft Internet Explorer") ver = "e4";

else ver = "n2";
if (ver == "e4"){

window.location.replace("http://kentdesign1.com/images/museum/exhibition.html");}

if(ver == "n2")
{
window.location.replace("http://www.pictures-by-lazlo.com/start_2004.html");
}

Jul 23 '05 #1
1 1706
On 22 Dec 2004 12:23:22 -0800, lazlo <no****@kentdesign1.com> wrote:

[snip]
I have a page with a script that works only in IE and as I heard from
feedbacks it doesn't run under IE on Mac.
I doubt it will work with any browser other than IE/Win. The sensible
thing to do is author for the Web, not IE.
I have browser type redirect script for that page that seems to be
working fine


Seems to, yes. Browser detection is unreliable. See
<URL:http://www.jibbering.com/faq/faq_notes/not_browser_detect.html#bdTop>.
It focuses on detection for the purposes of script execution (for obvious
reasons), but it's still applicable.

[snip]

Mike

--
Michael Winter
Replace ".invalid" with ".uk" to reply by e-mail.
Jul 23 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

60 posts views Thread by Fotios | last post: by
6 posts views Thread by Gustav Medler | last post: by
18 posts views Thread by Mickey Segal | last post: by
8 posts views Thread by R. Smits | last post: by
7 posts views Thread by mosaic | last post: by
22 posts views Thread by Luke Matuszewski | last post: by
reply views Thread by origami.takarana | last post: by
10 posts views Thread by Conrad Lender | last post: by
reply views Thread by rosydwin | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.