Browser Detect/Redirect Problem
I'm having a browser redirect problem. I'm using Dreamweaver 4.0 on this page, I want to redirect Netscape browsers to an alt URL specified in behaviors...when the page loads in Netscape, this is not happening.
Any ideas,
Thanks,
TonyMontana
Abhishek Reddy posted this at 10:44 — 24th July 2001.
He has: 3,348 posts
Joined: Jul 2001
hi,
dont know what DW does...but this is what i use for redirection :
<script lanuage="JavaScript">
function redirect_user()
{
if (navigator.appName=="Netscape")
{
window.location="<em>NS_URL.htm</em>";
}
else
{
}
}
</script>
stick that between the tags and use:
Abhishek Reddy posted this at 10:54 — 24th July 2001.
He has: 3,348 posts
Joined: Jul 2001
you will not believe how long it took me to do the color coding in the previous post. :D
similarly, like the appName=="Netscape" you could add appVersion<4.
eg (no colors ):
if (appName=="Netscape" && appVerion<4)
basically this does the same, but also checks if the browser version is less than 4.
Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.