Solved
How to implement a time limit at the block level plus auto-advancing?
I have several questions in one block, separated by page breaks. (Concretely, it's each one graphic and one horizontal MC question on each page). I want to set a time limit on the whole block (e.g. 3 minutes). The countdown timer should be visible to the respondent and not restart after each question. After the time limit is over, participants should be auto-advanced to the next block.
I tried the javascript proposed here:
https://stackoverflow.com/questions/47317718/how-to-use-automatically-move-respondents-in-qualtrics-with-global-timer-for-blo
as well as the adjustments proposed here (e.g. hidden MC question, no force response):
https://qualtrics.com/community/discussion/1487/custom-timer-progress-to-next-block-without-waiting-for-response
However, while the timer is working fine, I do not achieve that respondents are auto-advanced to the next block once the time is up. Could you please help me in solving this problem? Since I am completely new to JavaScript, I would be very happy about an ready-to-implement code/solution ;).
I thank you so much in advance!
Best answer by npetrov937
Hi @Geneve ,
From your code, delete the following lines:
x = 1;
var bgColor = setInterval(change, 1000);
And it will work fine!
The problem you're getting is that the "change" variable you're supplying the setInterval function is not defined and hence is throwing an error before executing the NextButton.click() function on the next row. You don't even need these two lines - they won't work in the way your code is written.
Hope that helps!
View originalLeave a Reply
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.