Solved
Javascript Basics
Hello
Can anyone help me understand how to use JavaScript within Qualtrics? I'm trying to say "If QID1=2 then set QID2=2", but I can't work out how to write the "QID1=2" part. This is what I have so far, but how do I refer to QID1 from within QID2? They are both Multiple Choice.
[Within QID2]
Qualtrics.SurveyEngine.addOnload(function()
{
if ( ??? getChoiceValue(2) == true)
{this.setChoiceValue(2, true)}
});
I've been looking at the API documentation, but there are very few examples, and none on how to use it to refer to another question.
Thanks,
Tricia
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.

Just place the above tag within QID2 question text and then use jQuery("#QID1Value").text(); which will give you the response from QID1 and then you would be able to write the "if condition" on it to set the value for QID2.
Hope you are familiar with JQuery