I have a research design that involves respondents playing a simple javascript game (which I guess I'll serve via an
Solved
Import results/response for external task back into Qualtrics survey
Best answer by hazenyc
Ok, I solved it on my own. Here's the solution for anybody who may have a similar Q. My solution may also not be the most elegant, but it works!
- Use HTML directly into the question to create the layout & call any third-party .js
- if wanted, call .css hosted somewhere else in that HTML (e.g. on dropbox or wherever). If you need image files stored elsewhere call them here too. (This is NOT an
- Drop the .js code directly into the questions' javascript window
- To carry the "score" variable forward, create an embedded variable in survey flow & name it (e.g. j_score).
- Then use the call in the javascript window for that question: Qualtrics.SurveyEngine.setEmbeddedData('j_score', score); -- where score is the variable inside your .js code that keeps score.
- To have the game played for a certain # of rounds and the auto-advance, put this.hideNextButton(); at the top to hide to button
- Have a count variable for number of iterations (e.g., var i = 0;) .. then say you want to stop after 10 rounds, use: if (i==10) {(function(){that.clickNextButton();}).delay(1);}
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.
