Can somebody help me with this:
I need to redirect IE 5.0 and lower browsers to one html-page, and IE 5.5 and higher browsers to another html-page.
How am I supposed to distinguish IE5.0 AND LOWER, from IE5.5 AND HIGHER in the Java script.
Here is the code that I磎 trying to use:
----------------------------------------------------------------------
<SCRIPT LANGUAGE="JavaScript">
<!-- This script and many more are available free online at -->
<!-- The JavaScript Source!! <!-- m --><a class="postlink" href="http://javascript.internet.com">http://javascript.internet.com</a><!-- m --> -->
<!-- Begin
var name = navigator.appName;
var vers = navigator.appVersion;
vers = vers.substring(0,1); // or 0,4 could return 4.5 instead of just 4
if (name == "Microsoft Internet Explorer")
url="msie";
else
url="netscape";
url += vers + ".html";
document.write('<center>');
document.write('<A HREF=http://www.webdeveloper.com/forum/archive/index.php/"' + url + '">Enter</A>');
document.write('</center>');
// You may make the redirection automatic by using this
// window.location=url;
// instead of the three document.write lines above
// End -->
</script>
I need to redirect IE 5.0 and lower browsers to one html-page, and IE 5.5 and higher browsers to another html-page.
How am I supposed to distinguish IE5.0 AND LOWER, from IE5.5 AND HIGHER in the Java script.
Here is the code that I磎 trying to use:
----------------------------------------------------------------------
<SCRIPT LANGUAGE="JavaScript">
<!-- This script and many more are available free online at -->
<!-- The JavaScript Source!! <!-- m --><a class="postlink" href="http://javascript.internet.com">http://javascript.internet.com</a><!-- m --> -->
<!-- Begin
var name = navigator.appName;
var vers = navigator.appVersion;
vers = vers.substring(0,1); // or 0,4 could return 4.5 instead of just 4
if (name == "Microsoft Internet Explorer")
url="msie";
else
url="netscape";
url += vers + ".html";
document.write('<center>');
document.write('<A HREF=http://www.webdeveloper.com/forum/archive/index.php/"' + url + '">Enter</A>');
document.write('</center>');
// You may make the redirection automatic by using this
// window.location=url;
// instead of the three document.write lines above
// End -->
</script>