Question
instead of this.questionclick , count mouseup event
For a question in my survey I need to count the number of clicks that were done.
The Click Count of Qualtrics (using either javascript's this.questionclick or using the Timing item's Click Count variable) only works for certain types of questions. It does not work, for example, for Ranking questions in which the participant must drag and drop. The dragging and dropping nature of the mouse click prevents it from registering it as a click. I therefore need a code that uses javascript's mouseup event (i.e. everytime a participant releases the left mouse button after having clicked it).
So, something like this:
object.onmouseup = function(){
var n = Qualtrics.SurveyEngine.getEmbeddedData('n');
n = n + 1;
Qualtrics.SurveyEngine.setEmbeddedData('n', n);
};
Except the above code doesn't work. I don't actually know how to use javascript (but I do have a basic understanding of programming languages) so I know I'm missing something, I'm just not sure what exactly I'm missing. Like, do I need to add an EventListener for this to work?
Thanks for your help!
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.
