We are not able to embed to jotform onto our website

  • mckinneyprojectgraduation
    Asked on April 1, 2015 at 12:37 PM

    We are trying to add our form to our website and the website is saying it can not accept the java script language and to delete it.  We don't know how to do that.

    We tried putting in the website link, and it will work, however then the Donate link on the form does not work.

  • Ben
    Replied on April 1, 2015 at 1:40 PM

    Could you please tell us what CMS you are using for your website?

    It appears that it is not allowing you to enter javascript code which is used for js embed option ( under <embed> ).

    What I would suggest instead is to use the iframe embed option, but remove the script part from it.

    To do that you should remove the part as shown here from the default iframe embed code:

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

    In the end you should only try to embed the part indicated with blue color:

    <iframe id="JotFormIFrame" onDISABLEDload="window.parent.scrollTo(0,0)" allowtransparency="true" src="https://secure.jotform.us/form/50837170071147" frameborder="0" style="width:100%; height:1430px; border:none;" scrolling="no"></iframe>

    Do let us know how it goes and as mentioned above, if you can tell us what CMS you are using, we would either have a guide for embedding on it, or create one.