Hello, I have done the above and copied the Iframe.

  • Hans
    Asked on February 22, 2018 at 8:36 PM

    Hello,

    I have done the above and copied the Iframe. here below the result.

    =======================================================================================

    var ifr = document.getElementById("JotFormIFrame-80502426013341");

    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[(args.length - 1)]); } 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;

    case "loadScript":

    var src = args[1];

    if (args.length > 3) {

    src = args[1] + ':' + args[2];

    }

    var script = document.createElement('script');

    script.src = src;

    script.type = 'text/javascript';

    document.body.appendChild(script);

    break;

    case "exitFullscreen":

    if (window.document.exitFullscreen) window.document.exitFullscreen();

    else if (window.document.mozCancelFullScreen) window.document.mozCancelFullScreen();

    else if (window.document.mozCancelFullscreen) window.document.mozCancelFullScreen();

    else if (window.document.webkitExitFullscreen) window.document.webkitExitFullscreen();

    else if (window.document.msExitFullscreen) window.document.msExitFullscreen();

    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);

    }

    =======================================================================================

    Preview current internet page the form is visible.

    Preview of the entire website is the form not showing up!!!?

    I have tried this with 3 internet explorer, (internet explorer 11-Firefox-Opera). Results are the same.

    My website is in own environment in development and not yet visible on the internet.

    I hope someone can help me as soon as possible with a working solution.

    Best regards,

    Hans

  • liyam
    Replied on February 22, 2018 at 10:14 PM

    Hello,

    You have only copied the javascript part of the embed code. The actual iframe code is missing. Can you please try getting the code again and make sure that you have the HTML tags that indicate <iframe....> </iframe>?

    Thanks.

  • hanstela
    Replied on February 23, 2018 at 8:43 AM
    Hello again,

    Where do I find the code if it is not in the Iframe copy Jot form is provided. Do I need anything?? Should I add something somewhere (but where?).
    I-have copied the code again but it doesn’t works
    Hans

    Van: JotForm [mailto:noreply@jotform.com]
    Verzonden: vrijdag 23 februari 2018 04:15
    Aan: hanstela@chello.nl
    ...
  • John_Benson
    Replied on February 23, 2018 at 9:19 AM

    Hi Hans,

    First, please try to embed your form using this guide: https://www.jotform.com/help/34-Adding-a-Form-to-a-Web-Page

    If you still want to use the iFrame method, please follow the screen animation below to copy the code:

    1519395497423c23 Screenshot 10:

    Also, we need to view your website so we can check it further. 

    Let us know how it goes.