A popup shows up the text of Unselected options
Hi guys, for some reason I need to inform the subjects that they did not select the other option in a question of two options.
For example, the question is
Which animal do you like?
1. Cats
2. Dogs
Say, if one select 1. Cats. then an alert pops up that says "You don't like Dogs?"
I am trying by googling this myself and it works with a single click function
Qualtrics.SurveyEngine.addOnload(function()
{
this.questionclick = function(event, element) {
if (element.type == 'radio')
{
if (this.getChoiceValue()==2){
var choice= this.getChoiceVariableName(1);}
if (this.getChoiceValue()==1){
var choice = this.getChoiceVariableName(2);}
var r = confirm("Reminder: This is the your choice "+choice); //design your question here
if (r == true) {
that.clickNextButton();
} else {
}
}
}
});
However, I need combine this with doubleclicking to the next page, then it does not work.
Qualtrics.SurveyEngine.addOnload(function() {
this.hideNextButton();
var that = this;
jQuery('.LabelWrapper').dblclick(function() {
if (this.getChoiceValue()==2){
var choice= this.getChoiceVariableName(1);}
if (this.getChoiceValue()==1){
var choice = this.getChoiceVariableName(2);}
var r = confirm("Reminder: This is the your choice "+choice); //design your question here
if (r == true) {
that.clickNextButton();
} else {
}
});
I highly appreciate any help that I can get.
Thank you everyone!
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.
