Javascript iFrame height keeps changing

  • Profile Image
    newschool
    Asked on January 15, 2016 at 09:42 AM

    Hi,

    We have noticed that the dynamic iframe height created by the javascript embed method changes over time.

    When I first added the script to the page the height was i believe 245px or so, now it has changed to 205 and is not revealing the submit button.

    <iframe onload="window.parent.scrollTo(0,0)" src="" allowtransparency="true" frameborder="0" name="53365902919968" id="53365902919968" style="width: 100%; border: none; height: 205px;" scrolling="no" data-tf-inspect="-289135710"></iframe>

    This only seems to be a new thing I have noticed  with the recent changes to the Jotform interface.

     

    cb

  • Profile Image
    newschool
    Answered on January 15, 2016 at 09:46 AM

    I made a change and then undid it and now the hight has changed again, but the form itself is identical. Some automated process is effecting the height at strange times. cb

  • Profile Image
    david
    Answered on January 15, 2016 at 12:17 PM

    If you replace the script embed code with the iframe code, you can set the height manually:

    http://www.jotform.com/help/148-Getting-the-Form-iFrame-Code

    In the first few lines of the embed code, you will see the height value.  Adjust that value to set the height of the frame to whatever you would like.

  • Profile Image
    newschool
    Answered on January 15, 2016 at 12:27 PM

    Sure, I can do that, but any idea why the height keeps changing? I would prefer to use the JS version as then if we change the form the height updates automatically with me having to remember where it is placed. cb

  • Profile Image
    david
    Answered on January 15, 2016 at 01:36 PM

    The javascript embed will attempt to fit whatever container it is put it.  If the frame you are embedding it to has variable sizing, so might the form.