View Full Version : redirection > IE4 - IE5.0 and IE5.5 - 6.0
Alias
07-18-2002, 03:56 AM
i need this kind of redirection :o
if (IE4 and IE5.0)
dothis()
else if (IE5.5 and IE6.0)
dolikethis()
possible :confused:
premshree
07-18-2002, 09:01 AM
Try this:
<script language="JavaScript">
if(document.all&&navigator.userAgent.indexOf("Opera")==-1)
{
if(navigator.Appversion<=5)
{
location.href="somePage.htm";
}
else
{
location.href="anotherPage.htm";
}
}
}
</script>
Alias
07-18-2002, 05:26 PM
:) this is interesting solution ... but i don't know why it doesn't work :confused:
(I try with IE 4 and IE 5.0)
premshree
07-18-2002, 06:16 PM
Try this:
<script language="JavaScript">
if(document.all&&navigator.userAgent.indexOf("Opera")==-1)
{
if(navigator.appVersion<=5)
{
location.href="somePage.htm";
}
else
{
location.href="anotherPage.htm";
}
}
}
</script>
Alias
07-18-2002, 06:54 PM
Well this is right thing:
(thanks to Site Admin from http://www.requestcode.com)
<html>
<head>
<title>Browser Version Test</title>
<SCRIPT LANGUAGE="JavaScript">
function populate()
{
var bver = navigator.appVersion.indexOf("MSIE")
if(bver!=-1)
{
bver=bver+5
var vernum = navigator.appVersion.substr(bver,3)
if(vernum>=5.5)
{alert("Version is 5.5 or greater - "+vernum)}
else
{alert("Version is less than 5.5 - " +vernum)}
}
else
{alert("Not an IE browser - "+navigator.appName)}
}
</SCRIPT>
</head>
<body>
<CENTER>
<BR><BR>
<A HREF="javascriptopulate()">Get Browser Info</A>
</CENTER>
</body>
</html>
Thank You premshree for your time dedicated to my problem :thumbsup:
Best Regards
vBulletin® v3.8.2, Copyright ©2000-2012, Jelsoft Enterprises Ltd.