JavaScript : Point the Way!
Contents ]
Dr Benton

Browser detection

The function PointeVers() starts with detection of the user browser. The way the masks are processed will in fact depend on the browser the visitor is using.

<SCRIPT LANGUAGE="Javascript">
var x=20;
var y=20;

ie4 = ((navigator.appName == "Microsoft Internet Explorer") &amp;amp; (parseInt(navigator.appVersion) >= 4 ))

Here we use a variable (ie4) which is assigned the value 1 if the browser in use is Internet Explorer 4 or later. The browser type is indicated by the property navigator.appName, and its version number by the property navigator.appVersion.



  1   2   3   4