Using operators within a string (Qualtrics + JavaScript)

I am trying to use Qualtrics if anyone is familiar with the program for a survey and I am embedding JavaScript in order to score some of the questions in a specific manner.

The problem I have is that I am trying to connect a string with operators but it fails to do so but when I try it in a different editor the string operators work fine.

Code:

alert("${q://QID5/SelectedAnswerRecode/1}");

which alerts the value,

alert("${q://QID5/SelectedAnswerRecode/" + 1 + "}");

this alerts an empty text box.

Note: alert("Hello" + " World"); works fine when I use this/

So if there is anyone who knows Qualtrics and knows why it does this or any other methods this would be a help.

Answers:

Tags

Recent Questions

Top Questions

Home Tags Terms of Service Privacy Policy DMCA Contact Us Javascript

©2020 All rights reserved.