need to resize my iFrame

  • Profile Image
    ivan 
    Asked on January 27, 2016 at 10:02 AM

    Dear Guys,

     

    few days ago i wrote asking about the resize of the contact form to my webpage. You answered soon but it still doesn't work.

     my url page http://www.obiettivobenessere.net/contatti.htm

    where you will see the embedded form, but is not good.

    the iframe code correct of my form is

     

    <iframe id="JotFormIFrame" onload="window.parent.scrollTo(0,0)" allowtransparency="true" src="https://form.jotformeu.com/60243101075339" frameborder="0" style="width:100%; height:691px; 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; } var isJotForm = (e.origin.indexOf("jotform") > -1) ? true : false; if(isJotForm && "contentWindow" in iframe && "postMessage" in iframe.contentWindow) { var urls = {"docurl":encodeURIComponent(document.URL),"referrer":encodeURIComponent(document.referrer)}; iframe.contentWindow.postMessage(JSON.stringify({"type":"urls","value":urls}), "*"); } }; if (window.addEventListener) { window.addEventListener("message", handleIFrameMessage, false); } else if (window.attachEvent) { window.attachEvent("onmessage", handleIFrameMessage); } if(window.location.href && window.location.href.indexOf("?") > -1) { var ifr = document.getElementById("JotFormIFrame"); var get = window.location.href.substr(window.location.href.indexOf("?") + 1); if(ifr && get.length > 0) { var src = ifr.src; src = src.indexOf("?") > -1 ? src + "&" + get : src + "?" + get; ifr.src = src; } } </script>

     

    can you help me?

     

    Ivan

  • Profile Image
    david
    Answered on January 27, 2016 at 12:06 PM

    In the first part of your iFrame code, there is a height attribute:

    <iframe id="JotFormIFrame" onload="window.parent.scrollTo(0,0)" allowtransparency="true" src="https://form.jotformeu.com/60243101075339" frameborder="0" style="width:100%; height:691px; border:none;" scrolling="no"> </iframe>

    Changing the height value will increase the height of the frame.  Increase this value until the full form fits in the frame.