I know nothing about javascript, and not a whole lot about programming, but I wanted to create a page which checked the user's os, and if they are using a mobile OS (iphone, android, etc...), forward them to a mobile website, and if they are using a computer, forward them to the normal website. Here is the page I made:
<head>
<title>OS Check | website.web.org</title>
<SCRIPT LANGUAGE = "javaScript">
if (navigator.appVersion.indexOf("Win")!=-1) && (navigator.appVersion.indexOf("Mac")!=-1) && (navigator.appVersion.indexOf("X11")!=-1) && (navigator.appVersion.indexOf("Linux")!=-1) location.href= "http://website.web.org/mobile/index.html"
else location.href = "http://website.web.org/Home.html"
</SCRIPT>
</head>
Basically, what its meant to be doing is checking all of the major computer OSs, and if its not one of them, sending the user to the mobile webpage, but if it is one of them, sending them to the Computer site.
Can someone please tell me what the error/problem in this page/script is?
Thanks, Luke