iframe controls not working

  • Profile Image
    theseaandstars
    Asked on January 29, 2013 at 01:32 PM

    I have a form that is supposed to be in an iframe, I have embeded the proper code for the tool, and have set the scrolling feature to yes as well as selected a custom height. For some reason these controls are not working on my site, as you can see the form seems to be running on its default values. A little help would be much appreciated.

  • Profile Image
    theseaandstars
    Answered on January 29, 2013 at 01:37 PM

    Here is the code

    <iframe id="JotFormIFrame" onload="window.parent.scrollTo(0,0)" allowtransparency="true" src="https://secure.jotformpro.com/form/30278048184961" frameborder="0" style="width:100%; height:650px; border:none;" scrolling="yes"></iframe>

    <script type="text/javascript">window.handleIFrameMessage = function(e) {var args = e.data.split(":");var iframe = document.getElementById("JotFormIFrame");if (!iframe)return;switch (args[0]) {case "scrollIntoView":iframe.scrollIntoView();break;case "setHeight":iframe.style.height = args[1] + "px";break;}};if (window.addEventListener) {window.addEventListener("message", handleIFrameMessage, false);} else if (window.attachEvent) {window.attachEvent("onmessage", handleIFrameMessage);}</script>

  • Profile Image
    theseaandstars
    Answered on January 29, 2013 at 01:48 PM

    bump

  • Profile Image
    Welvin
    Answered on January 29, 2013 at 02:31 PM

    Hi,

    This is your first thread about the same issue. Please kindly check.

    http://www.jotform.com/answers/171291-iframe-controls-not-working

     

    Thanks

  • Profile Image
    EltonCris
    Answered on January 29, 2013 at 02:32 PM

    Hi,

    How about using the default script embed code instead of iframe code? This should help since you are using page break which changes its height depending on the page content. This wont be a problem with script embed code.

    Thanks!