954,574 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Cross-browser script... Not working for Opera...

<html>
<head>
<title></title>
<script>
if(navigator.userAgent.indexOf("Firefox") != -1)
{
   window.location = "secondLayer/indexFF.htm";
}
else if(navigator.userAgent.indexOf("MSIE") != -1)
{
   window.location = "secondLayer/indexIE.htm";
}
else if(navigator.userAgent.indexOf("Netscape") != -1)
{
   window.location = "secondLayer/indexNS.htm";
}
else
{
   window.location = "secondLayer/indexX.htm";
}
</script>
</head>
<body>
	<p>Please wait while the browser redirects you...</p>
</body>
</html>


Can I just copy and past an "else if" into this like the others and pass off the value "Opera" and have it be redirected???

Wolf_22
Newbie Poster
1 post since Aug 2005
Reputation Points: 10
Solved Threads: 0
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You