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

    Image Upload Preview Widget is not finishing the uploads

    Asked by stretchandstaple on November 23, 2015 at 02:15 PM

    The image upload preview widget is malfunctioning it just sticks on finishing upload and never finishes.  I am literally losing thousands of dollars a day as people can not purchase prints from us.

     

    Page URL:
    http://www.stretchandstaple.com/#!canvas-prints/c1fqx

    preview preview widget upload preview purchase
  • Profile Image

    Answered by Ben on November 23, 2015 at 03:56 PM

    I took a look at your form https://secure.jotformpro.com/form/51035094519958 on your website and for me it seems to be working properly:

    However as you can see this is a very small image, so I presume that your image (that was failing for you) is either larger, or the issue is no longer present.

    Can you please tell us if the issue is still present for you and if it is, is it still present for you if you upload your image over direct form - not the embedded one?

    I do want to point out that I had noticed that your iframe embed code (the script part that follows it to be precise) has some issues, so instead of this:

    <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 = arg[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>

    You should change it with this:

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

    Once you do, it will help as it will resolve a js bug that happens each time your form needs to be resized.

  • Profile Image

    Answered by stretchandstaple on November 23, 2015 at 05:04 PM

    Hi,

    So I tried doing it directly on the form, not the embedded one and I am getting the same problem, try it with an image 6mb or larger and you will see what I mean.

    I have had this form live for over a year without any trouble, with the same script.

  • Profile Image
    JotForm Support

    Answered by Kevin_G on November 23, 2015 at 07:50 PM

    Hi,

    Your issue has been replicated for one of my collegues, he has reported it to our developers..

    To assist you better, follow that thread, you will recieve news there : 

    http://www.jotform.com/answers/710435-Image-Upload-Preview-Widget-not-working-again

    Thanks.