bob
08-18-2010, 11:38 PM
I need help writing a browser detection script in javascript
Something Similar to below, but so I can have many more browsers and the option to load indepedent html's depending on the browser, I would like the ability to add browsers such as netscape, IE, safari, firefox, opera and chrome...
<script language="JavaScript"
type="text/JavaScript">
if(navigator.appName == "WebTV")
{
window.location = "WebTVHome.html"
}
if(navigator.appName == "Netscape")
{
window.location = "NetscapeHome.html"
}
if(navigator.appName == "Microsoft Internet Explorer")
{
window.location = "ExplorerHome.html"
}
window.location == "Other.html"
</script>
Thanks Bob
Something Similar to below, but so I can have many more browsers and the option to load indepedent html's depending on the browser, I would like the ability to add browsers such as netscape, IE, safari, firefox, opera and chrome...
<script language="JavaScript"
type="text/JavaScript">
if(navigator.appName == "WebTV")
{
window.location = "WebTVHome.html"
}
if(navigator.appName == "Netscape")
{
window.location = "NetscapeHome.html"
}
if(navigator.appName == "Microsoft Internet Explorer")
{
window.location = "ExplorerHome.html"
}
window.location == "Other.html"
</script>
Thanks Bob