Creative COW SIGN IN :: SPONSORS :: ABOUT US :: CONTACT US
WEB: Web Design Forum- TutorialsDreamweaver Forum- TutorialsFlash Forum- TutorialsWeb StreamingTraining

Browser Redirect For IE7?

Cow Forums : Adobe Dreamweaver
Browser Redirect For IE7?
by Michael Thibault on Mar 20, 2008 at 6:30:18 pm

Ideally, I'd like to redirect Internet Explorer for both Mac & PC earlier than version 7--Supposedly, the latest version doesn't have the PNG transparency issue. It's a little hard to scrounge up the proper redirect code online as most of the samples are pretty old and rarely address any version of IE newer than 5.x. If anyone can suggest the additional code that would also detect versions earlier than IE7 that would be greatly appreciated. I currently have placed this code in my index and it's working good (This isn't EXACTLY the code, since I had to replace the < character with < so I could post this. I know, it looks like a mess to me too):

<a href='<img src='<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 TRANSITIONAL//EN">
<html>

<head>
<title>redirecting</title>
<script language='Javascript' type='text/Javascript'>
<!--
if ((navigator.appName=="Microsoft Internet Explorer") || (navigator.appName=="Netscape"))
{
if (navigator.appName=="Microsoft Internet Explorer")
window.location = "browser.html";
else
window.location = "gauntlet.html";
}
else
window.location = "gauntlet.html";
//-->
</script>
</head>
<body>

</body>'><img src='<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 TRANSITIONAL//EN">
<html>

<head>
<title>redirecting</title>
<script language='Javascript' type='text/Javascript'>
<!--
if ((navigator.appName=="Microsoft Internet Explorer") || (navigator.appName=="Netscape"))
{
if (navigator.appName=="Microsoft Internet Explorer")
window.location = "browser.html";
else
window.location = "gauntlet.html";
}
else
window.location = "gauntlet.html";
//-->
</script>
</head>
<body>

</body></a>
</html> '>

Respond to this post   •   Return to posts index

Re: Browser Redirect For IE7?
by Abraham Chaffin on Mar 20, 2008 at 6:54:55 pm

Hey Michael,

I'd start by going through this tutorial and use the script there:
http://www.quirksmode.org/js/detect.html

Once it's setup you can use
the variables
BrowserDetect.browser
and
BrowserDetect.version
to filter the users you want to the proper page.


Below the javascript provided there you would put something like:


if (BrowserDetect.browser=="Explorer"&&BrowserDetect.version<7)
window.location = "browser.html";
else
window.location = "gauntlet.html";
}



I haven't tested this but I'd imagine it works.

Abraham

Respond to this post   •   Return to posts index

<< PREVIOUS THREAD   •   VIEW ALL THREADS   •   PRINT   •   NEXT THREAD >>


FORUMSTUTORIALSMAGAZINEDVDsBOOKSPODCASTSEVENTSSERVICESNEWSLETTERNEWSBLOGS

© CreativeCOW.net All rights are reserved.

[Top]