Topic Areas
Free Scripts
Information
Resources
Tutorials
Information
Search
Help Forums
Contact
Link to Us
Submit Script
Privacy Policy
More Resources
Free Stuff
Web Resources
Other Links
PageResource.com: Learn HTML
Just Free Stuff
JavaScript City
Browser Redirect (Netscape or Internet Explorer)

Script Introduction

This script sends the viewer to the right page depending on the type of browser being used. If the browser is NS, it goes to an NS version of the page. If it is IE, it goes to an IE version of the page. Otherwise, the viewer goes to a page for other browsers.

Cut and Paste Code: HEAD Section
This code should be placed between the <head> and </head> tags.

Installation Instructions

  1. Paste the HEAD Section code from above between the <head> and </head> tags on your page.
  2. Find the matching lines below in the script and change the text in red to the text you wish to use:

    window.location="http://someplace.com/ns.html";
    window.location="http://someplace.com/ie.html";
    window.location="http://someplace.com/others.html";

  3. Check the Format Window to be sure you do not have one single line of code, or too many line breaks in the code.

Example

A working sample of the script is shown below. Click the link to open a new page and test the script.

Example Link

JavaScript Book
JavaScript: A Beginner's Guide
by John Pollock
What's New
Simple Searchbox script added.
More...
Web Xpertz
Find more JavaScript tools and resources at WebXpertz City! Click one of the links above to browse the various attractions within the city.