Click to See Complete Forum and Search --> : Grabbing window width in both NS and IE


ianderso
02-11-2003, 11:45 AM
I just need to grab the width of the browser window in both IE and NS. I've seen this before, but I can't remember the DOM. Any help would be appreciated. Thanks in advance.

IZA

gil davis
02-11-2003, 11:59 AM
For NS, it is:

window.innerWidth

There is no corresponding window property in IE. You have to use:

document.body.clientWidth