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 wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Determine current window hgt/wdt 2

Status
Not open for further replies.

MikeBarone

Programmer
Mar 1, 2001
354
US
Can anyone tell me the properties used to determine a windows overall width and height?

outerHeight and outerWidth works for NN but not IE. Does anyone know the IE properties?

Thanks. Mike Barone
FREE CGI/Perl Scripts & JavaScript Generators
Ace PopUp Generator Software - Totally FREE
 
If I'm not mistaking it should be....
document.body.offsetWidth
document.body.offsetHeight My codes look like something a kid wrote
I have absolutely no idea what I am talking about
Somehow I still manage to make it work
 
yeah, or
document.body.clientWidth
document.body.clientHeight

at least it works for me, but u have 2 check for this values onload or inside (or after) body section, else if u wuld try 2 knowout window's width just in head section, for example, u wuld get an error (body wont exist on that moment, so, u cant get any of its properties..) Victor
 
There is no way to find out the outer dimensions of a window in IE. The document.body.offsetWidth on IE is equivalent to innerWidth on Netscape.

Maybe you can make a workaround, because window.open() uses the outer dimensions in both browsers as far as I know.
 
sorry Mike, didnt understood ur subj :-( Victor
 
I appreciate the responses.

I was unable to find the code either.

document.body.clientHeight/Width was as close as I could come.

Thanks all. Mike Barone
FREE CGI/Perl Scripts & JavaScript Generators
Ace PopUp Generator Software - Totally FREE
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top