auto-advancing to the next page not working | XM Community
Question

auto-advancing to the next page not working

  • 5 March 2021
  • 2 replies
  • 12 views

Userlevel 1

I've already browsed quite a few posts on this forum relating to auto-pressing the next button, but none of the existing solutions seem to do the trick for me. My idea is to have a countdown, and once the timer hits 0, I'll automatically load the next page. Could someone help me out?
Here's my code:
h //within Qualtrics.SurveyEngine.addOnload(function(){

  function startTypingTimer() {
  typingTimer = setInterval( function(){
  if (typingTimeLimit > 0) {
  document.getElementById("seconds").innerHTML=pad(--typingTimeLimit%60);
          document.getElementById("minutes").innerHTML=pad(parseInt(typingTimeLimit/60,10));
  }
  if (typingTimeLimit == 0) {
  clearInterval(typingTimer);
  jQuery("#NextButtion").click();
  }
    }, 1000);
  }

//alternatively, I've tried:
Qualtrics.SurveyEngine.addOnReady(function(){
if (this.typingTimeLimit == 0) {
this.clickNextButton();
}
});

//another way I tried was replaing the jQuery("#NextButton") line in the first example with "this.clickNextButton()"
// wrapped in a function() {} 


2 replies

Userlevel 7
Badge +21

image.png

Userlevel 1

Oh you mean my typo?
Thank you, that solved it!

Leave a Reply