944,116 Members | Top Members by Rank

Ad:
  • JSP Discussion Thread
  • Unsolved
  • Views: 4376
  • JSP RSS
Aug 29th, 2005
0

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

Expand Post »
JSP Syntax (Toggle Plain Text)
  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???
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
Wolf_22 is offline Offline
1 posts
since Aug 2005

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC