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

    Stop LightBox From Scrolling Up

    Asked by Tony on July 30, 2013 at 07:17 AM

    How can I stop the lighbox from scrolling my page? I have a simple submit form in my site that triggers a lightbox.

    However, if I were to scroll down the page, and then decide to "submit", the the lightbox would open and then bring me back to the to of the page. How do I stop that?

    I posted my site url so you'll see what I mean.

    Page URL:
    http://testmycode.tumblr.com/

    site scroll
  • Profile Image

    Answered by jefreylandicho on July 30, 2013 at 09:48 AM

    Unfortunately you cannot stop the lightbox from going to the top.  The reason why is works that way is to prevent users from scrolling up after hitting a button. You can try adding iframeParameters: {noJump: true} inside the script though this wont guarantee it will stop it from going to the top. e.g.

    <script src="//cdn.jotfor.ms/static/feedback2.js?3.1.902" type="text/javascript">

                                new JotformFeedback({

                                formId:'31745053537353',

                                base:'http://jotformeu.com/',

                                windowTitle:'S',

                                background:'#FFA500',

                                fontColor:'#FFFFFF',

                                type:2, height:500,  width:500,  iframeParameters: {noJump: true}                                              });

                        </script>

    If you have any other questions, please contact us again.

  • Profile Image

    Answered by Tony on July 30, 2013 at 11:51 AM

    Thanks for the quick answer. 

    I'm not sure I understood the reason why the lightbox is altering with my page scroll. If you take a look at this site http://9gag.com/, scroll down and press the "Keyboard" button to the bottom right, you'll see that the scroll position of the page stays the same whereas my site does not. Isn't that a lightbox too?

  • Profile Image
    JotForm Support

    Answered by Welvin on July 30, 2013 at 01:17 PM

    Hi Tony,

    No, that isn't a lightbox. I've check your website and can see the problem you've mentioned. Unfortunately, it is a different from my end. When I click the "submit", it opens up a lightbox then scrolled me down the bottom of your website. Same with clicking the "submit" when I am in the middle of the site.

    Can you please try to remove the number "2" from the "http://cdn.jotfor.ms/static/feedback2.js?3.1.902" so it becomes: "http://cdn.jotfor.ms/static/feedback.js?3.1.902". See if this helps you to resolve the issue.

    Thanks

  • Profile Image

    Answered by Tony on July 31, 2013 at 10:18 PM

    Sorry that didn't work. Removing that prevents the page from scrolling but it also disables my lightbox

    I found this link by chance https://www.jotform.com/answers/202562-Lightbox-window-moves-on-top-of-the-page-when-page-break-button-is-clicked

    The demo is perfect, it doesn't scroll. However, changing http://cdn.jotfor.ms/static/feedback2.js?3.1.902 to https://shots.jotform.com/elton/lightbox_nojump.js breaks it.

  • Profile Image
    JotForm Support

    Answered by EltonCris on August 01, 2013 at 02:16 AM

    Hi Tony,

    The one you found in the other thread won't help. The problem might be related to the form since the form source code has onload scrollto event,

     onload="window.parent.scrollTo(0,0)"

    This is hardcoded on the form so I don't think there's any way to change this. We'll try to come up another workaround and get back to you if there's any.

    Stay tuned!

  • Profile Image
    JotForm Support

    Answered by EltonCris on August 02, 2013 at 08:28 AM

    Hi Tony,

    Sorry but I found no way to prevent the page from autoscrolling using lightbox form. How about embedding your form as pop-up? This is the easiest alternative to resolve this issue.

    However, if you prefer lightbox effect, you may consider using jquery 3rd party lightbox scripts. You may find few suggestions listed on this page: http://stackoverflow.com/questions/1174205/jquery-simplest-lightbox. When you use any of these, you can then use your form URL e.g. https://www.jotform.com/form/12345678990 instead of the embed code to create a lightbox.

    Since you are using jQuery in your page, this won't be a problem.

    If you require further assistance, let us know. Regards!

  • Profile Image

    Answered by antoniooi on October 20, 2013 at 03:11 AM

    Funny behavior, make no sense for a lightbox to scroll the dark background to the top of page. You guys better fix this. I'm getting tired of this.

  • Profile Image
    JotForm Support

    Answered by EltonCris on October 20, 2013 at 08:18 AM

    @antoniooi

    We'd much appreciate if you could open new thread for your question and provide the website URL where your form is embedded so our team will be able to assist you with this and escalate it to our developers if necessary.

    Best Regards!

  • Profile Image

    Answered by antoniooi on October 20, 2013 at 09:05 AM