I would like to redirect netscape versions 1 through 4 to one page and everyone else to another page. I found this script on this page and loaded it into the body of the index page.
This is the script:
<script>
<!-- Begin
var name = navigator.appName;
var vers = navigator.appVersion;
vers = vers.substring(0,4); // or 0,4 could return 4.5 instead of just 4
if (name == "Microsoft Internet Explorer")
url="/html/index.php";
else
url="netscape";
url += vers + ".htm";
window.location=/html/index.htm;
//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 changed two lines. I added the url line for internet explorer;url="/html/index.php";
and the url for the netscape page
window.location=/html/index.htm;
Did I enter the urls in the right place?
The webpage is <!-- w --><a class="postlink" href="http://www.yorkieparadise.com">www.yorkieparadise.com</a><!-- w -->
The netscape page I would like to load is <!-- w --><a class="postlink" href="http://www.yorkieparadise.com/html/yorkieparadise.com">www.yorkieparadise.com/html/yorkieparadise.com</a><!-- w --> and for all others I would like to load is <!-- w --><a class="postlink" href="http://www.yorkieparadise.com/html/index.php">www.yorkieparadise.com/html/index.php</a><!-- w -->
Thank you for your help.
Tom
This is the script:
<script>
<!-- Begin
var name = navigator.appName;
var vers = navigator.appVersion;
vers = vers.substring(0,4); // or 0,4 could return 4.5 instead of just 4
if (name == "Microsoft Internet Explorer")
url="/html/index.php";
else
url="netscape";
url += vers + ".htm";
window.location=/html/index.htm;
//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 changed two lines. I added the url line for internet explorer;url="/html/index.php";
and the url for the netscape page
window.location=/html/index.htm;
Did I enter the urls in the right place?
The webpage is <!-- w --><a class="postlink" href="http://www.yorkieparadise.com">www.yorkieparadise.com</a><!-- w -->
The netscape page I would like to load is <!-- w --><a class="postlink" href="http://www.yorkieparadise.com/html/yorkieparadise.com">www.yorkieparadise.com/html/yorkieparadise.com</a><!-- w --> and for all others I would like to load is <!-- w --><a class="postlink" href="http://www.yorkieparadise.com/html/index.php">www.yorkieparadise.com/html/index.php</a><!-- w -->
Thank you for your help.
Tom