Solved
Error message when saving JS code (updated)
New here. Our JS code (for a customized audio player) worked very well until a few days ago when a problem occured.
The problem is every time I open the JS dialogue for an item and then try to save the JS script even without any editing, I got this error message:
"Invalid JavaScript! You cannot save until you fix all errors: Unexpected reserved word"
The funny thing is, the item with the script still runs properly on Qualtrics survey, which means it might not be "Invalid JavaScript" afterall (I guess).
But right now I am not able to change anything in the script (without finding out what the real bug is, that is).
Please help. * Code included in comment*
* Code included in comment*
*Question updated, error replicated with minimal code*
Best answer by yangye0312
Quick update @TomG. I found out that the following code gave me the exact problem:
```
Qualtrics.SurveyEngine.addOnload(function()
{
class Player {
});
```
Changing the class name to anything else and the issue remains. It seems like the reserved word is "class". This seems like a bug to me.
Do other people experience the same problem?
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.


