So currently i've got the below, but this simply produces the error alert regardless of what option is selected. As a complete JS rookie, I have been unable to get past this!
Qualtrics.SurveyEngine.addOnUnload(function()
{
var q1 = parseInt(document.getElementById('QR~QID1/ChoiceDescription/3')),
msg = 'INSERT ERROR TEXT HERE';
if (q1,1)
{
alert(msg);
document.getElementById('QR~Q1D1/ChoiceDescription/3').focus();
return false;
} else {
return true;
}
});
Anyone able to help would be greatly appreciated!
Cheers.
Best answer by Anonymous
View original