Iframe enigma

Discussion in 'JavaScript' started by ferroariel, Sep 22, 2010.

  1. #1
    I've got an IFRAME
    it loads a page with variable contents
    I need to know the WIDTH of the body of that page
    I'm using offsetWidth and offsetHeight

    This is weird....

    offsetHeight returns the height of the document body
    offsetWidth returns the width of the iframe !!!!!!! (??????????)

    Please, what am i doin wrong??
     
    ferroariel, Sep 22, 2010 IP
  2. camjohnson95

    camjohnson95 Active Member

    Messages:
    737
    Likes Received:
    17
    Best Answers:
    0
    Trophy Points:
    60
    #2
    It probably depends on the document that is loaded within the iframe... if it is using a fixed width (say 1000px) or a variable width (100%). What is the URL of the page that is being loaded within the frame?
     
    camjohnson95, Sep 22, 2010 IP