Form is cut off when embedded

  • Profile Image
    addiverschuuren
    Asked on February 22, 2015 at 05:26 AM

    <iframe id="JotFormIFrame" onload="window.parent.scrollTo(0,0)" allowtransparency="true" src="//form.jotform.co/form/50405657600853" frameborder="0" style="width:100%; height:1367px; border:none;" scrolling="no"></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;case "collapseErrorPage":if (iframe.clientHeight > window.innerHeight) {iframe.style.height = window.innerHeight + "px";}break;case "reloadPage":window.location.reload();break;}};if (window.addEventListener) {window.addEventListener("message", handleIFrameMessage, false);} else if (window.attachEvent) {window.attachEvent("onmessage", handleIFrameMessage);}</script>

     

    Or if I use the embedd code...

    it just shows the first part of the form. tried to change the height. worked for the other form on this website at reservations for a booking.

     

    Do not know what Iam doing wrong.

     

     

    PS: USE URL without the 'www. ' with the www you will probably still end up on the old website.

     

    thank you very much,

     

    addi

     

     

  • Profile Image
    EltonCris
    Answered on February 22, 2015 at 09:03 AM

    Hi,

    Your iframe embed code is messed up. The end quote on the style attribute was placed after the width property which is supposed to be after the border:none; property.

    Or you can resolve it by re-embedding using only this iframe embed code.

    <iframe id="jotformiframe" onload="window.parent.scrollto(0,0)" allowtransparency="true" src="//form.jotform.co/form/50405657600853" frameborder="0" style="width:100%;height: 1183px;border:none;" scrolling="no"></iframe>

    Hope this helps. Thanks!

  • Profile Image
    addi 
    Answered on February 22, 2015 at 11:50 AM

    Hi EltonCris, thanX for the quick reply, but now I get the same visable format but with a scroll bar...

    I copied the 'messed-up' iframe just as received , and now I copied your new iframe as you gave it to me.... I want it to be as a whole form on the page... I can't see anything weird in the codes but it does not what I used to get when using your forms. (always very happy with the results ;-)  )

    http://fincalescoves.com/reservationform.html

     

    could you please look one more time? thank you very much.

     

    addi

     

     

  • Profile Image
    EltonCris
    Answered on February 22, 2015 at 12:00 PM

    Sorry, there was a mistake with the codes I've provided to your earlier.

    Please use this instead:

    <iframe id="jotformiframe" onload="window.parent.scrollto(0,0)" allowtransparency="true" src="//form.jotform.co/form/50405657600853" frameborder="0" style="width:100%;height:1183px;border:none;" scrolling="no"></iframe>

    Let us know if this doesn't make any difference. Thanks!

  • Profile Image
    addi 
    Answered on February 22, 2015 at 01:40 PM

    THANK you. It is perfect now.

    :-)

  • Profile Image
    Ben
    Answered on February 22, 2015 at 03:13 PM

    In my colleague Elton's name, you are welcome. I am glad to hear that it is working for you now and please do let us know if you have any further issues and we would be happy to assist.