Re: Browser sensitive page direction
by "Rossi Designs" <webmaster(at)rossidesigns.net>
|
Date: |
Wed, 23 Feb 2000 08:46:05 -0500 |
To: |
"Gary Thorpe" <gthorpe(at)saltus.bm>, <hwg-techniques(at)hwg.org> |
References: |
saltus |
|
todo: View
Thread,
Original
|
|
<script language="javascript">
// set variables to true or false by setting vendor specific objects
var IE4 = document.all;
var NN4 = document.layers;
// redirect
if (IE4) {
window.location.replace("ie_page.html");
}
if (NN4) {
window.location.replace("nn_page.html");
}
/* users with old browsers or javascript shut off should stay on same page
which usually is better than trying to redirect the lesser browsers
*/
</script>
I usually just write code that degrades nicely instead of redirecting so I
haven't
written a script like this for a while but I hope this points you in the
right direction.
Rossi Designs
(904) 226-8979
P.O. Box 1084, Holly Hill, Florida 32125-1084
http://rossidesigns.net
----- Original Message -----
From: Gary Thorpe <gthorpe(at)saltus.bm>
To: <hwg-techniques(at)hwg.org>
Sent: Wednesday, February 23, 2000 12:38 AM
Subject: Browser sensitive page direction
| this has probably been asked a 100 times on this forum, but does anyone
have
| a piece of javascript or other means of detecting the browser a user is
| viewing my web site with. I would like to send the viewer to a page
| appropriate to their browser, be it IE or Netscape. to date i have to get
| the user to select their browser from 2 icons and then they are taken to 2
| different pages
| much appreciated
| gary thorpe
|
|
HWG hwg-techniques mailing list archives,
maintained by Webmasters @ IWA