SitePoint Enthusiast
Not sure if this is the right forum,
but this is what i need to do:
i need a script that detects if a visitor is using netscape, and which will direct the visitor to either page a or page b when clicking on a link,
is there a script that can accomplish that?
Thanks for any help
SitePoint Enthusiast
Sure this is nice & easy!
Try something like this:
<script language="JavaScript">
<!-- hide from older browsers
if (document.layers) {
// Netscape Navigator code
window.location.href = "indexnavigator.htm";
}
else if (document.all) {
// Internet Explorer code
window.location.href = "indexie.htm";
}
else if (document.getElementById) {
// Netscape 6 code
window.location.href = "indexn6.htm";
}
else {
// Unrecognised browser code
alert("Unrecognised browser detected!");
}
// -->
</script>
It looks for differences in their implmentations of the Document Object Model, then automatically redirects.
SitePoint Enthusiast
thanks rips,
since i am the antichrist of coding i will probably screw this up, in that case i might have a follow-up question
Posting Permissions
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
Forum Rules
Bookmarks