making a browser stay on a page despite a redirect script

by "Lady Wistfulee" <wistfulee(at)hawaii.rr.com>

 Date:  Fri, 7 Jan 2000 14:15:28 -1000
 To:  <Undisclosed-Recipient:;(at)mail.hwg.org>
  todo: View Thread, Original
Hi,
I am using a VERY basic redirect script...since the site is designed for =
people to access part of their IE4+ capabilities, the idea is to =
redirect everything below IE4 & NN4.7 & the others. =20
Right now I have a script in the head that redirects the browser all =
right but I have a part in the script that redirects the IE4 etc. =
browsers also.  I had looping problems & a few people let me know what =
it took to stop that (Thank you again to all who helped BTW).=20
But... do I need to be redirecting those upgraded browsers in the first =
place??  I really only want to redirect the un-upgraded browsers, & have =
anyone else just stay there.  Right now I am accomplishing my objective =
by the script below. BUT..can I just remove the parts about the higher =
version browsers, & only redirect the lower versions?  What I would like =
to do is have but one script to put in the head of each page, without =
having to edit each & every page with the page's URL like I would have =
to do now.


function whatBrowser()
                   { var browserName =3D navigator.appName;
      browserVer =3D parseInt ( navigator.appVersion );

 name =3D "0";
 if ( browserName =3D=3D "Netscape" && browserVer >=3D 4.7 ) name=3D"1";
 if ( browserName =3D=3D "Microsoft Internet Explorer" && browserVer =
>=3D4 ) name=3D"2";
 if ( browserName =3D=3D "Netscape" && browserVer < 4.7 )name=3D"3";
 if ( browserName =3D=3D "Microsoft Internet Explorer" && browserVer <4 =
)name=3D"4";
 if ( browserName !=3D "Microsoft Internet Explorer" && browserName !=3D =
"Netscape") name=3D"5";
if ( browserName =3D=3D "Opera" ) name=3D"6";
      if (name =3D=3D "3")
 location.href=3D("http://everythingemail.tripod.com/vanilla.html");
      else
      if (name =3D=3D "4")
   location.href=3D("http://everythingemail.tripod.com/vanilla.html");
      if (name =
=3D=3D"5")location.href=3D("http://everythingemail.tripod.com/vanilla.htm=
l");
      else
      if (name =3D=3D "6")
 location.href=3D("http://everythingemail.tripod.com/vanilla.html");
// THIS IS THE PART I WOULD LIKE TO ADJUST OR REMOVE=20
// SO THEY JUST STAY ON THE PAGE THEY ARE ON
      if ( (name <=3D "2") &&
        (location.href !=3D "THE URL FOR EACH INDIVIDUAL PAGE") )
      location.href =3D "THE URL FOR EACH INDIVIDUAL PAGE";



much alohas from Oahu ...
Lady Wistfulee
--"Tell me and I forget.=20
Show me and I remember.=20
Involve me and I learn."=20

HWG: hwg-languages mailing list archives, maintained by Webmasters @ IWA