[thelist] script that works ok in IE but not in NN

Peter Hammar phammar at dplanet.ch
Tue Jan 30 13:24:32 CST 2001


> I have this script that gives the expected result in IE 4.x and 5.x but
does
> not work in Netscape Navigator 4.08.

> var sw = screen.width;
> var sh = screen.height;

Hi,

for NS, you should use

window.innerWidth
window.innerHeight

HTH
Peter






More information about the thelist mailing list