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 3 of 3
  1. #1
    New to the CF scene
    Join Date
    Jul 2003
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts

    window.height vs. window.availHeight

    window.height and window.availHeight both return 600px even though the IE browser window is open normally (not in full screen mode).

    I thought window.availHeight should exclude system elements such as the window taskBar and return only the height of the active portion of the screen.

    Am I wrong?

    Thanks for helping
    ContiW

  • #2
    Senior Coder
    Join Date
    Aug 2002
    Location
    UK
    Posts
    2,789
    Thanks
    2
    Thanked 14 Times in 14 Posts
    Try some of these in IE and Moz

    document.body.clientWidth
    document.body.clientHeight

    document.body.offsetWidth
    document.body.offsetHeight

    Window.innerWidth
    Window.innerHeight

    Window.outerWidth
    Window.outerHeight

    document.getElementsByTagName('body')[0].offsetWidth
    document.getElementsByTagName('body')[0].offsetHeight

    document.documentElement.offsetWidth
    document.documentElement.offsetHeight
    The silent one.

    The most dangerous thing in the world is an idea.
    The most dangerous person in the world is the one with an idea.

  • #3
    New to the CF scene
    Join Date
    Jul 2003
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Thank you Mr J. Good hint. This is what I came out with :

    if (self.innerHeight){y = self.innerHeight;}
    else if (document.documentElement && document.documentElement.clientHeight){y = document.documentElement.clientHeight;}
    else if (document.body){y = document.body.clientHeight;}

    All the best.
    ContiW


  •  

    Posting Permissions

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