Window width

Giganews Newsgroups
Subject: Window width
Posted by:  Grant Ito (Grant_I…@shaw.ca)
Date: Sun, 13 Jul 2003

Hi,

What I thought to be a fairly straight-forward project is turning out to be
ridiculous. I'm simply trying to determine the width and height of a browser
window in IE v.6.0, but to no avail. I'm finding conflicting information
regarding which window property I should be using, and in all cases I am
receiving an "undefined" result. Code is as follows:

function displayWidth(){
  window.alert("Width = " + window.outerWidth);
}

How can I determine the width and height of my browser window?

Thanks,
Grant.

Replies