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

    Submit form can't reset to top of page.

    Asked by scottdever on May 01, 2014 at 09:21 AM

    Hello, I have read another thread on this and after following the suggestion still cannot make this work.  The problem is that my form is long and when the user hits the submit button the thank you message is displayed but cannot be seen without the user scrolling to the top of the page manually.

    below is the iframe i have in my page:

    <iframe id="JotFormIFrame" onload="window.parent.scrollTo(0,0)" allowtransparency="true" src="//form.jotform.us/form/41113639376152" frameborder="0" style="width:100%; height:1317px; 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;}};if (window.addEventListener) {window.addEventListener("message", handleIFrameMessage, false);} else if (window.attachEvent) {window.attachEvent("onmessage", handleIFrameMessage);}</script>

    Please let me know what I can do, thanks!

    Page URL:
    http://www.femmefido.com/registration.html

    JotForm Thank You message problem style
  • Profile Image
    JotForm Support

    Answered by ashwin_d on May 01, 2014 at 10:36 AM

    Hello scottdever,

    I would suggest you to please exclude the script code and see if that helps you solve your problem. Please use only the following embed code:

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

    or you can also try to remove the onload="window.parent.scrollTo(0,0)" from the above iFrame code and see that helps you. Here is the code:

    <iframe id="JotFormIFrame" allowtransparency="true" src="//form.jotform.us/form/41113639376152" frameborder="0" style="width:100%; height:1317px; border:none;" scrolling="no"></iframe>

    Do try both the options and get back to us if the issue persists.

    Thank you!