Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 5 of 5
  1. #1
    Regular Coder
    Join Date
    Oct 2003
    Location
    SC
    Posts
    936
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Angry document.height in IE

    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

  • #2
    Master Coder
    Join Date
    Feb 2003
    Location
    Umeå, Sweden
    Posts
    5,575
    Thanks
    0
    Thanked 83 Times in 74 Posts
    liorean <[lio@wg]>
    Articles: RegEx evolt wsabstract , Named Arguments
    Useful Threads: JavaScript Docs & Refs, FAQ - HTML & CSS Docs, FAQ - XML Doc & Refs
    Moz: JavaScript DOM Interfaces MSDN: JScript DHTML KDE: KJS KHTML Opera: Standards

  • #3
    Regular Coder
    Join Date
    Oct 2003
    Location
    SC
    Posts
    936
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Ahhh IE is sooo bad, i hate it, but thanks for the link it helped me a lot

  • #4
    Regular Coder
    Join Date
    Feb 2003
    Posts
    638
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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.
    hmm... ?

  • #5
    New Coder
    Join Date
    Jun 2012
    Location
    Atlanta, Georgia, United States
    Posts
    34
    Thanks
    0
    Thanked 8 Times in 8 Posts
    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:

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

    http://w3.org


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •