What is JotForm?
JotForm is a free online form builder which helps you create online forms without writing a single line of code. No sign-up required.

At JotForm, we want to make sure that you’re getting the online form builder help that you need. Our friendly customer support team is available 24/7.

We believe that if one user has a question, there could be more users who may have the same question. This is why many of our support forum threads are public and available to be searched and viewed. If you’d like help immediately, feel free to search for a similar question, or submit your question or concern.


  • Profile Image

    Console is registering two error about iframe communication being blocked

    Asked by ctphoto on August 28, 2015 at 01:46 PM

    Looking at my webpage that has a jotform iFramed in it, I get these two errors. What do they mean?

     

    [Error] Blocked a frame with origin "https://secure.jotformpro.com" from accessing a frame with origin "https://stillrivereditions.com". Protocols, domains, and ports must match.

    (anonymous function) (jotform.forms.js, line 202)

    (anonymous function) (prototype.forms.js, line 54)

    responder (prototype.forms.js, line 549)

    dispatchEvent ([native code], line 0)

    fire (prototype.forms.js, line 574)

    _methodized (prototype.forms.js, line 60)

    fireContentLoadedEvent (prototype.forms.js, line 578)

    [Error] Blocked a frame with origin "https://secure.jotformpro.com" from accessing a frame with origin "https://stillrivereditions.com". Protocols, domains, and ports must match.

    (anonymous function) (jotform.forms.js, line 217)

    (anonymous function) (prototype.forms.js, line 54)

    responder (prototype.forms.js, line 549)

    dispatchEvent ([native code], line 0)

    fire (prototype.forms.js, line 574)

    _methodized (prototype.forms.js, line 60)

    fireContentLoadedEvent (prototype.forms.js, line 578)

    Page URL:
    https://stillrivereditions.com/files_received_order_form.php

    JotForm domains secure.
  • Profile Image

    Answered by Ben on August 28, 2015 at 04:02 PM

    I can not see the same error in the console, but based on what you have posted it means that the code from the jotform - which is in the iframe, was sending the message to its script part (the one that you can find right after the iframe part):

    <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 &gt; 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>

    Basically this code is checking the messages coming from the iframe to see if there is something that should be done to the iframe - like change its height - if new fields are shown, etc.

    Now, I do not see another iframe holding the jotform iframe, but I presume that there might be another code on your website capturing the iframe messages as well and sending this data to the iframe - causing the errors to be shown.

    These errors should not cause any issues, but if you want to resolve them, do let us know what is the browser that you got the error and if the error happens only on page load?

    Anything that you can tell us to be able to recreate the issue should allow us to better understand it and help resolve it.