Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How can I find the actual browser window size in IE?

Status
Not open for further replies.

Thalhuber

Programmer
Jan 2, 2003
8
US
To put it simply, what I'm looking for is a property on IE equivalent to "outerHeight" on NN (or some trick to calculate it).

The reason I need it is a little more complicated:

I'm doing a window.open(), then in the opened window I'm resizing it in the onLoad event. On IE, with window.reSize() the height you specify will include the Status Bar area. There appears to be no way to check whether the Status Bar is visible using IE JavaScript. If I could do that, I could increase the height property (if it's visible) when I resize the window.

This was not a problem prior to Windows XP SP2. Starting with SP2, the Status Bar is automatically added to the browser window on window.open() - even if I request that it not be displayed.

IE has a couple properties (document.body.clientHeight, etc.) that provide the "client" area dimensions of the browser window.

NN provides similar properties with "innerHeight", but also provides "outerHeight" (actual window height, not just the client area). The difference allows you to calculate the space used for the Status Bar, etc.

Any ideas?
 
ooops!
In the previous post I said "window.reSize()" ... should be "window.resizeTo()"
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top