www.webdeveloper.com
Results 1 to 2 of 2

Thread: problem with resize script, but why?

  1. #1
    Join Date
    Sep 2010
    Posts
    9

    problem with resize script, but why?

    I'm not sure why this isn't working, because the values are coming through.
    [thecode]

    checkParent = function() {
    childHeight = window.frames['iframe'].document.getElementById("wrap").offsetHeight;
    parentHeight = document.getElementById("subbody").style.height;
    iframeHeight = document.getElementById("iframe").style.height;
    parentHeight = ((childHeight + 5) + "px");
    iframeHeight = (childHeight + "px");
    }

    [/thecode]

    It reads (on the test page) the wrap height is 325px, and the iframe height is 150px. It should see that 'wrap' is 325 pixels tall, then add 5 pixels. Then take that number (330) and make the iframe and subbody elements heights.

    Any idea why it isn't working?

  2. #2
    Join Date
    Jun 2007
    Posts
    667
    parentHeight and iframeHeight are variables. Setting their value has no effect on anything else.
    Y_U U_G_A_E_U_ B_S_A_D_

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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



Recent Articles