Hi everyone,
I want to set up a block with a number of questions (and page breaks), which after exactly 2 minutes will progress to the next block. Regardless of what the subject has accomplished / clicked / performed in that block.
I set a variable in the embedded data: timer1 = 120 and wrote the following code in each question in the block-
Qualtrics.SurveyEngine.addOnload(function()
{
var timer1= parseInt("${e://Field/timer1})");
var timer = setInterval(function(){
if(timer1<=0){
clearInterval(timer);
$('NextButton').click();
}
timer1--;
},1000);
$('NextButton').onclick = function(event){
Qualtrics.SurveyEngine.setEmbeddedData('timer1',timer1);
}
});
And it does not work ...
Can anyone tell me where I went wrong?
many thanks!
Leave a Reply
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.