How to Embed Form to Ebay

  • johnboy666
    Asked on September 25, 2014 at 9:19 AM

    I have read the forum answers and used the source code to embed form into ebay listing.

     

    But when I remove the following Javascript - The form does not function (i.e - User cannot submit their form)

     

    <script src="//max.jotfor.ms/static/prototype.forms.js" type="text/javascript"></script>

    <script src="//max.jotfor.ms/static/jotform.forms.js?3.2.3797" type="text/javascript"></script>

    <script type="text/javascript">

     

     

    Is there a way around this?

     

    Thanks in advance,

    John Reimann.

     

     

  • johnboy666
    Replied on September 25, 2014 at 10:20 AM

    Well I have found a very crude work-around but I'm not sure if it will get me in trouble.

    I downloaded my jotform as an iframe - Then uploaded it to an external host (where my website is located).

    I then called that iframe from my ebay listing by breaking up the work (iframe):

    <script>document.write('<i'+'frame src="mysite.com/myjotform.html" width="100%" frameborder="0" scrolling="no" hspace="0" height="800"></i'+'frame>');</script>

     

    It works - BUT I'd love a better solution as I'm not convinced I won't get caught out.

     

  • Elton Support Team Lead
    Replied on September 25, 2014 at 11:32 AM

    Hi,

    The form depends on that script, without it, the form will not function properly. I was thinking eBay is stripping these codes perhaps? Have you tried the iframe embed code without its script? http://www.jotform.com/help/148-Getting-the-Form-iFrame-Code

    Example:

    <iframe id="JotFormIFrame" onDISABLEDload="window.parent.scrollTo(0,0)" allowtransparency="true" src="//form.jotformpro.com/form/42671425954965" frameborder="0" style="width:100%; height:2347px; border:none;" scrolling="no"></iframe>

    Do not include the script below.

    <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;}};if (window.addEventListener) {window.addEventListener("message", handleIFrameMessage, false);} else if (window.attachEvent) {window.attachEvent("onmessage", handleIFrameMessage);}</script>

    If this doesn't work then I think your workaround is the best solution. Ebay seems very strict with embed codes and there's nothing we can do about it, unfortunately.

    Thank you so much!