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

    Prevent page from auto scrolling

    Asked by reciproc8 on July 20, 2013 at 08:58 PM

    Hey guys

    On embedded forms that have page breaks, when you hit next, it changes the scrolled position of the page to center the webform.  I have content above my webform.  I have page breaks between each question and I want my content to always be visible.  But for some reason this problem happens and it puts the webform at the top or automatically scrolls the page.  How can this be prevented?

    problem next content
  • Profile Image
    JotForm Support

    Answered by EltonCris on July 20, 2013 at 09:23 PM

    Hi,

    Try adding ?nojump at the end part of the form URL found in your embed code.

    Example,

    If you are embedding your form as script:

    <script type="text/javascript" src="//form.jotformpro.com/jsform/32002213563943?nojump"></script>

    And, if it's iframe, follow this:

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

    Let us know if this doesn't help.

    Thanks!

  • Profile Image

    Answered by reciproc8 on July 22, 2013 at 03:28 PM

    Work great thanks

  • Profile Image

    Answered by reciproc8 on July 31, 2013 at 01:56 PM

    Hey

    I just tried this on another form and it is now working.  I added the ?nojump and it is not working.

     

    Here is the iFrame code

    iframe id="JotFormIFrame" onload="window.parent.scrollTo(0,0)" allowtransparency="true" src="//form.jotform.co/form/31925424748864?nojump" frameborder="0" style="width:100%; height:954px; 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

  • Profile Image
    JotForm Support

    Answered by Welvin on July 31, 2013 at 03:10 PM

    Hi,

    Please use just this codes:

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

     

    Thanks

  • Profile Image

    Answered by reciproc8 on July 31, 2013 at 06:19 PM

    Worked.

     

    Now I need to use it for other forms.  How do I get this code?  The iFrame code I get shows up as the one I pasted in before.

    Also, is an iFrame embed better than javascript?

  • Profile Image
    JotForm Support

    Answered by Goldo on July 31, 2013 at 07:20 PM

    You can use the above code and just the change the form source url. You can adjust the width and height to suit your website.

    <iframe id="JotFormIFrame" onload="window.parent.scrollTo(0,0)" allowtransparency="true" src="http://form.jotform.co/form/31925424748864?nojump" frameborder="0" style="width:100%; height:954px; border:none;" scrolling="no"></iframe>

    We prefer iFrame as it avoid code conflicts.

  • Profile Image

    Answered by reciproc8 on September 23, 2013 at 07:19 PM

    Whenever I use this code on other forms it shows the error:

    Invalid Form URL

    This form is not available for this domain.

     

    Dafaq? 

  • Profile Image

    Answered by Cesar on September 23, 2013 at 07:55 PM

    You can use the code shown by Goldo, on other forms, just make sure the the src="" matches the URL you would use to access the stand-alone form.

    Kindly let us know if the issue persists. Thank you.

  • Profile Image

    Answered by reciproc8 on September 23, 2013 at 07:56 PM

    I have tried using that code multiple times with the correct URL and it never works anymore

  • Profile Image

    Answered by pinoytech on September 23, 2013 at 08:28 PM

    Hi,

    Can you please share to us the URL of your website where your form is embedded for further assistance?

    Thank you!