Website jumps to the top when the form is done loading

  • zapin
    Asked on December 7, 2017 at 2:06 PM

    my site "jumps" up a bit, when product photos are loaded on it. If you start scrolling down as it loads, then when it finish loading site jumps up a bit, anyway to avoid this ?

  • David JotForm Support Manager
    Replied on December 7, 2017 at 3:15 PM

    I just checked your product images, and after viewing them, the page did not jump up:

    1512677556nojumping Screenshot 10

    Let us know if you need more help.

  • zapin
    Replied on December 9, 2017 at 9:39 AM

    I´m sorry, I dind´t explain it very well. I mean, that when web page is loading, especially on mobile devices, if I scroll down while it is loading the page, it jumps to the top of the form/site when finished loading the images, is there anyway to avoid that ? Once the page and images are loaded there are no problem. 

    I hope that better explains my problem.

  • Mike_G JotForm Support
    Replied on December 9, 2017 at 3:17 PM

    Thank you for clarifying your concern.

    What you are experiencing is an effect of the onload attribute of the Iframe embed code you used to embed your form to your website.

    <iframe id="JotFormIFrame-73353235943357" onDISABLEDload="window.parent.scrollTo(0,0)" allowtransparency="true" src="https://form.jotformeu.com/73353235943357" frameborder="0" style="width: 1px; min-width: 105%; height: 5480px; border:none;" scrolling="yes"> </iframe>

    This means that the page will scroll to the top when the form is done loading.

    To prevent such, you can try removing that attribute and/or adding a ?nojump after the direct link of the form in the src attribute of the Iframe Embed code. Here's an example:

    <iframe id="JotFormIFrame-73353235943357" allowtransparency="true" src="https://form.jotformeu.com/73353235943357?nojump" frameborder="0" style="width: 1px; min-width: 105%; height: 5480px; border:none;" scrolling="yes"> </iframe>

    I hope this helps. If you have other questions or concerns, please feel free to contact us again anytime.

  • zapin
    Replied on December 10, 2017 at 1:11 AM

    Problem solved, thank you for your great help.