Skip to content

Instantly share code, notes, and snippets.

@mattbloomfield
Created July 10, 2018 17:21
Show Gist options
  • Save mattbloomfield/51d75c2961f7025f7f8654bcdb3d27f3 to your computer and use it in GitHub Desktop.
Save mattbloomfield/51d75c2961f7025f7f8654bcdb3d27f3 to your computer and use it in GitHub Desktop.
Qualtrics.SurveyEngine.addOnload(function() {
// Qualtrics.SurveyEngine.setEmbeddedData('${q://QID18/ChoiceNumericEntryValue/3}', 67); // impossible
var x =34;
document.getElementById("demo1").innerHTML = x;
});
Qualtrics.SurveyEngine.addOnReady(function() {
// don't use the addunload function here, just listen for the next button click
jQuery('#NextButton').click(function() {
var x = 17;
Qualtrics.SurveyEngine.setEmbeddedData('demo1InnerHTML', x.toString());
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment