The coding on my phone interferes with the mobile display on my website?

  • Profile Image
    openstart
    Asked on May 04, 2017 at 08:59 AM

    I have had to change form to a more basic one on my website www.openstart.co.uk as the mobile display of the form I paid for doesn't properly display.

    This code:

     

    <iframe id="JotFormIFrame-71233029315346" onload="window.parent.scrollTo(0,0)" allowtransparency="true" src="https://form.jotformeu.com/71233029315346" frameborder="0" style="width:100%; height:4201px; border:none;" scrolling="no"> </iframe> <script type="text/javascript"> var ifr = document.getElementById("JotFormIFrame-71233029315346"); if(window.location.href && window.location.href.indexOf("?") > -1) { 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; } } window.handleIFrameMessage = function(e) { var args = e.data.split(":"); if (args.length > 2) { iframe = document.getElementById("JotFormIFrame-" + args[2]); } else { 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); } </script>

     

     

  • Profile Image
    seth
    Answered on May 04, 2017 at 10:28 AM

    Hello,

    I tested the iFrame code on an empty HTML file and it is working properly:

    http://codepen.io/Yontem/pen/gWxVMa

    Please, try getting a fresh iFrame code from JotForm publish section and embed the form into your website. After that contact us again. We need to investigate the issue on your website, in order the find the cause of the issue.

    We are awaiting your response.

    Thank you very much.