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

    Iframe - scroll to top of page

    Asked by art_crate on July 03, 2015 at 11:29 PM

    When using a iframe to display the form, is there anyway to use html to get the page to scroll to the top when you are going through a multi page survey?


    I have tried this with no success:

     <body onload="location.target="_blank" href='#top'">


    Page URL:

  • Profile Image

    Answered by Boris on July 04, 2015 at 01:37 AM

    The form should scroll to the top automatically when using a multi-page form, and clicking on Next. If this is not the case in your website, would you please be so kind to provide an URL to the exact page where you have embedded your form, so that we can take a look.

    Thank you.

  • Profile Image

    Answered by art_crate on July 04, 2015 at 01:40 AM



    Its very noticeable when viewing on a mobile device

    Thanks for the help!

  • Profile Image

    Answered by Boris on July 04, 2015 at 02:01 AM

    Oh, now I see what you were talking about, and I apologize for the confusion. The form will scroll to the top of its own page (the top of the form), but it does not scroll to the top of your own website.

    This is by design of how iFrames work in general, and I'm afraid that we do not have a workaround for it on our end. It was a conscientious decision by the creators of web and iFrames that goes far back, and has valid reasoning behind it.

    As the iFrame is a page on its own inside your website, sandboxed from the rest of your website, it doesn't see around it. The iFrame doesn't know how far down on the real page it is, so it couldn't know if it is OK to jump to the top of the website page. As you are interacting with the iFrame - such as opening other URLs inside the frame - the iFrame will always jump into focus with the top of the affected iFrame being at the top of your screen.

    I hope this explanation was helpful, and I apologize for not having a solution that you desire. I hope you understand that this behavior is not something that is mandated by JotForm, but rather a feature of web in general.