[thelist] Screen Resloution Detection.

Peter-Paul Koch gassinaumasis at hotmail.com
Mon May 21 01:24:47 CDT 2001

>document.write("This browser version is " + navigator.appVersion)
>document.write(" of <B>" + navigator.appName + "</B>. ")
>// browser test:
>browserName = navigator.appName;
>browserVer = parseInt(navigator.appVersion);

Don't do a browser detect, it's not necessary. Instead do

if (self.innerWidth)
	frameWidth = self.innerWidth;
	frameHeight = self.innerHeight;
else if (document.body)
	frameWidth = document.body.clientWidth;
	frameHeight = document.body.clientHeight;

Now frameWidth and -Height contain the width and height of the frame or 
window. No need for complicated browser detect stuff or Java.


Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.

More information about the thelist mailing list