One of my forms that is embedded using an iframe method won't show up in the page using IE11

  • becshall73
    Asked on October 8, 2015 at 9:27 AM

    Hi, 

    I have been testing on Win 8.1 and IE11 and one jotform embedded via an iframe doesn't display anything.  However I have got another form on the same website that works fine.

     

    The page where the form is not displaying is: http://www.laurenpearson.net/school-visits/

     

    I originally tried the form with https and then I changed it to http to see if that would work, but it doesn't.  The other page where a different one of your forms does work is:  http://www.laurenpearson.net/contact/.

     

    Thanks.

     

  • becshall73
    Replied on October 8, 2015 at 9:32 AM

    And the same problem occurs on Win 10 IE 11.

    Thanks.

  • Welvin Support Team Lead
    Replied on October 8, 2015 at 1:16 PM

    We've updated our iframe embed method and looks like you are using the old version and since you are using WordPress, the script part was not triggered.

    Please try re-embedding the form again with the codes below:

    <iframe id="JotFormIFrame" onDISABLEDload="window.parent.scrollTo(0,0)" allowtransparency="true" src="https://form.jotform.com/52591821671963" frameborder="0" style="width:100%; height:514px; 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>

    I have highlighted two sets of codes here. If using all gives you the same issue, remove the codes that is highlighted with Yellow color.

    Thanks

  • becshall73
    Replied on October 12, 2015 at 3:25 AM

    Hi, thanks very much.  That works really well even on IE 8 on Windows 7!  

     

    A couple of further things...

    I only created the webpage a few weeks ago, so how come I was using the old-style embed - has it just changed?

     

    On Win XP and IE8 this form displays okay, but the contact form ( http://www.laurenpearson.net/contact/.)  gives an IE error message (Cannot display webpage).

     

    Thanks.

     

  • Charlie
    Replied on October 12, 2015 at 10:12 AM

    Hi,

    Thank you for your understanding on this. Currently, there are minor and major changes being made in the form builder, some are fixes and some are upgrades. It should still be optimized to be used in the latest browsers, however, it is quite common to get loading problems especially on old browser versions like IE8. There's also a chance of script conflict between your Wordpress' resources and of the form's.

    Aside from using the iFrame code, you can also refer to this guide: http://www.jotform.com/help/324-A-Guide-To-Forms-For-WordPress-JotForm-Users 

    I hope that helps.