detecting Netscape or IE

  You are currently not logged in. You can view the forums, but cannot post messages. Log In | Register

25-Feb-00 19:18
Is there a way in javascript to detect which browser the user has and pass him automatically to the IE or Nescape optimized site?

akai
25-Feb-00 19:57
There are a few ways to do this and various scripts available. Your best bet is to look at one of the javascript resource sites such as javascript.com where you can find a variety of scripts to use.


Dave
14-Mar-00 14:37
Most scripts use the navigator Object and the appName attribute to retrieve information about the browser, but there is a simpler way of doing this.

use:

if(document.layers) { //test for netscape
location.href="netscape.htm";
}

if(document.all) { //test for MSIE
location.href="ie.htm";
}

Java Guy
http://www.reprisal.co.uk

<font face="Verdana,Arial,Helvetica,Sans-serif" size=-1 color=#ff0000>Edited by java_guy19 on Tue Mar 14 15:28 2000</font>

 
New posts
Old posts

Follow Elated