Hello everyone,
I am new here, so please bare with me if my format is wrong.
Here is what's going on. I have a custom next button using JS. After clicking on custom next button twice, it will have a popup asking user to confirm. What I want is, if the user is sure, then I can record what his answer was (as an embedded data field) and go on to the next question.
However, a weird problem occurred, I can only record the user choice but cannot let it automatically go on to the next page.
Here is the code inside addOnload function.
if(buttonStatus){
if(confirm('Are you saying that if I offer you $' + (parseInt(confirmFinal())+1) + ', you will take it and not take the gamble? And if I offer you $'+ (parseInt(confirmFinal())-1) + ', you would take the gamble for sure?')) {
this.clickNextButton();
Qualtrics.SurveyEngine.setEmbeddedData('userChoice1', confirmFinal() );
return;
}
else{
resetCells();
buttonStatus = false;
return;
}
}
I also used Qualtrics.SurveyEngine.clickNextButton() and didn't work.
Page 1 / 1
replace` this.clickNextButton();`
with `jQuery("#NextButton").click() ;`
with `jQuery("#NextButton").click() ;`
Thank you!
Leave a Reply
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.