Using operators within a string (Qualtrics + JavaScript)

萝らか妹 提交于 2019-12-02 17:46:02

问题


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.

来源:https://stackoverflow.com/questions/25849755/using-operators-within-a-string-qualtrics-javascript

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!