@mattyb513 just wanted to say that your code works for me. Thank you. This example made it simple to learn how to get keyboard responses.
@TomG You gave me the hint I needed. Thank you for your help. For anyone else who stumbles across this, the following code will get you the RTs for a repeated MC question in a loop-merge block as a string of comma separated values: Qualtrics.SurveyEngine.addOnReady(function() { var starttime = new Date().getTime(); $('NextButton').hide(); this.questionclick = function(event,element){ if (element.type == 'radio') { var endtime = new Date().getTime(); var RT = endtime - starttime; var EmData = Qualtrics.SurveyEngine.getEmbeddedData('reactiontime'); var Holder = []; if (EmData == null){ Holder += RT Qualtrics.SurveyEngine.setEmbeddedData('reactiontime', Holder); } if (EmData != null){ Holder += EmData; Holder += ", "; Holder += RT; Qualtrics.SurveyEngine.setEmbeddedData('reactiontime', Holder); } $('NextButton').click(); } } });
Already have an account? Login
Enter your username or e-mail address. We'll send you an e-mail with instructions to reset your password.
Sorry, we're still checking this file's contents to make sure it's safe to download. Please try again in a few minutes.
Sorry, our virus scanner detected that this file isn't safe to download.