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

Reply

Join Date: Aug 2005
Posts: 1
Reputation: Wolf_22 is an unknown quantity at this point 
Solved Threads: 0
Wolf_22 Wolf_22 is offline Offline
Newbie Poster

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

 
0
  #1
Aug 29th, 2005
  1. <html>
  2. <head>
  3. <title></title>
  4. <script>
  5. if(navigator.userAgent.indexOf("Firefox") != -1)
  6. {
  7. window.location = "secondLayer/indexFF.htm";
  8. }
  9. else if(navigator.userAgent.indexOf("MSIE") != -1)
  10. {
  11. window.location = "secondLayer/indexIE.htm";
  12. }
  13. else if(navigator.userAgent.indexOf("Netscape") != -1)
  14. {
  15. window.location = "secondLayer/indexNS.htm";
  16. }
  17. else
  18. {
  19. window.location = "secondLayer/indexX.htm";
  20. }
  21. </script>
  22. </head>
  23. <body>
  24. <p>Please wait while the browser redirects you...</p>
  25. </body>
  26. </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???
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC