Make JS Code Embed Form Scroll to Top After Submit

  • Therock83
    Asked on March 26, 2019 at 1:26 AM

    I have read most of the solutions on the help forum but most deal w iFrames. I just want my page to anchor to top after submission. This is not happening by default. Please advise.

    Form is not live on web yest but is in account.

    THANKS!

  • Nik_C
    Replied on March 26, 2019 at 3:04 AM

    The issue could be related to the website where you're embedding, could you please let us know on which website you would like to embed your form?


  • Scott Berg
    Replied on March 26, 2019 at 4:52 AM

    The form is already embedded @ https://chicagolandwatermedics.com/emergency-contact.html

  • Nik_C
    Replied on March 26, 2019 at 6:07 AM

    Yes, I was able to replicate this problem on submitting your form.

    As you mentioned as well, the usual solution to this problem is iFrame, since you can set such an option in the code.

     <iframe id="JotFormIFrame-90838763842166" onDISABLEDload="window.parent.scrollTo(0,0)" allowtransparency="true" allowfullscreen="true" allow="geolocation; microphone; camera" src="https://form.jotform.com/90838763842166" frameborder="0" style="width: 1px; min-width: 100%; height:539px; border:none;" scrolling="yes">

    With other embedding methods, the form stays where you scrolled and after submit, scroll bars stay at the same point.

    I'm not sure there is a way to do that otherwise.


  • Therock83
    Replied on March 26, 2019 at 6:16 AM

    Yes agreed... couldn't get it to respond to any JavaScript either so will go with a redirect - Prob Solved. Thanks!