auto-advancing to the next page not working | XM Community
Skip to main content

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() {} 

image.png


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


Leave a Reply