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 2010
    Posts
    2
    Thanks
    1
    Thanked 0 Times in 0 Posts

    problem getting clientHeight

    hey, im having an issue getting the screen size of my browser in IE, it works fine in firefox and safari using window.innerHeight but when i try to use document.body.clientHeight, it doesnt work, the width works, but height just gives me back a 0. any help? this is the code

    Code:
    var sHeight=document.body.clientHeight;

  2. #2
    Supreme Master coder! _Aerospace_Eng_'s Avatar
    Join Date
    Dec 2004
    Location
    In a place far, far away...
    Posts
    19,291
    Thanks
    2
    Thanked 1,043 Times in 1,019 Posts
    It varies among browsers. This might help you

    http://andylangton.co.uk/articles/ja...ze-javascript/

    It has IE6 in the comments but they still apply to other IE versions.

  3. Users who have thanked _Aerospace_Eng_ for this post:

    brem13 (07-25-2010)

  4. #3
    New to the CF scene
    Join Date
    Jul 2010
    Posts
    2
    Thanks
    1
    Thanked 0 Times in 0 Posts
    thank you, it works now!


 

Tags for this Thread

Posting Permissions

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