javascriptcssqualtrics

Qualtrics: Page does not start at the top


When the page overflows, that is when not everything on the page can be displayed without any scrolling, then the page automatically jumps to the question part of the survey page. Is there a way to prevent this with Javascript so that every page in the survey starts from the top?

I already tried to add this code to the JS of the questions:

Qualtrics.SurveyEngine.addOnload(function() {
window.scrollTo(0,0);
});

but unfortunately it did not work.

Note: This behavior only occurs with the simple layout.


Solution

  • It should be in a setTimeout function in the addOnReady() function. Also, you should put it in the survey header instead of individual questions.

    <script>
    Qualtrics.SurveyEngine.addOnReady(function() {
      setTimeout(function() { window.scrollTo(0,0); },0);
    });
    </script>