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 2 of 2

Thread: resizing help

  1. #1
    New to the CF scene
    Join Date
    May 2005
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    resizing help

    Hi, I'm trying to dynamically resize a window's height based on the content, this it what I have, but it's not working.

    var H=document.body.clientHeight;
    window.resizeTo( 220 , H );

  • #2
    Senior Coder
    Join Date
    Aug 2002
    Location
    UK
    Posts
    2,789
    Thanks
    2
    Thanked 14 Times in 14 Posts
    clientHeight is the window height so really you are setting it to what it already is.

    scrollHeight is the height of the document so you want to try


    var H=document.body.scrollHeight
    window.resizeTo( 220 , H );

    I have not tested this it is just a way of thinking
    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.


  •  

    Posting Permissions

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