...

View Full Version : document.height in IE



JAVAEOC
03-21-2004, 06:21 PM
I wrote a little script, but as it is often IE can not do the simple tasks...

I am getting the document.height in Mozilla, but IE does not return a number it says it is undefined, why?

what can i use instead?

thanks for any help :(

liorean
03-21-2004, 07:17 PM
Hmm, have a look at <http://msdn.microsoft.com/library/default.asp?url=/workshop/author/om/measuring.asp>

JAVAEOC
03-23-2004, 02:45 AM
Ahhh IE is sooo bad, i hate it, but thanks for the link it helped me a lot :thumbsup: :D

swmr
03-23-2004, 03:00 PM
Original sig by JAVAEOC
IE is evil, I hate it, it always destroys my script, if you are still using that stupid thing called IE get Mozilla now :)
"The enemy is fear. We think it is hate; but, it is fear."
- Gandhi.

jonathansampson
06-27-2012, 01:24 AM
Just stumbled across this old thread. For anybody coming across this today, note that document.height is not a standard property, in fact it's officially "obsolete" according to the Mozilla Developer Network documentation.

The correct way to get the height of the document (which works in IE) is to access the documentElement:


document.documentElement.clientHeight

As always though, check the spec as it may be another 8 years before somebody finds this post.

http://w3.org



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum