What is the difference between height, scrollHeight and style.height

Discussion in 'JavaScript' started by jadeite100, May 31, 2007.

  1. #1
    Hi:

    I have a IFrame called "dataFrame". Does anybody know the difference between

    document.getElementById('dataFrame').height

    and

    document.getElementById('dataFrame').Document.body.scrollHeight;

    and

    document.getElementById('dataFrame').style.height


    Yours,

    Frustrated
     
    jadeite100, May 31, 2007 IP
  2. wing

    wing Active Member

    Messages:
    210
    Likes Received:
    14
    Best Answers:
    0
    Trophy Points:
    58
    #2
    height returns the height of a iframe.
    Document.body.scrollHeight returns the total height of a window with scroll included.

    style.height can be used to define height

    Ex: document.getElementById("whatever").style.height=500;
     
    wing, May 31, 2007 IP