Hello!
I am trying to implement Balloon Analogue Risk Task into Qualtrics (https://github.com/joyfulwei/Balloon-task-in-Qualtrics) - however, when I paste the given JS script I cannot go further because of the error:
Invalid JavaScript! You cannot save until you fix all errors: Unexpected token {
The code is quite long (I do not want to paste it unnecessarily here): https://github.com/joyfulwei/Balloon-task-in-Qualtrics/blob/master/Javascript%20code Maybe there is something obvious that can be spotted?
On line 172, add the closing bracket:
This will fix the JS error, but it's quite an old code, so please test it a few times to ensure that the required data is being stored.
ahmedA, it works, thank you!
However, you are completely right that this code is very buggy - and it will require many hours to make it work :((
I just worked out a solution to make it less buggy. If this code is from this github you should change the HTML code on the question, it is near the top. It looks like it was trying to load a no longer supported version of jscript-query-ui.js and would spend two minutes trying to find an updated version when you first run it (I assume, I dont actually know js). After running it once it saves it and will work fine but for participants that are running it just once this is obviously an issue. This should do the trick.
Code to Replace:
https://cdn.bootcss.com/jqueryui/1.13.1/jquery-ui.css rel="stylesheet">
New Code:
https://cdn.bootcss.com/jqueryui/1.13.1/jquery-ui.css rel="stylesheet">
DMcCollum, thank you!
However, both versions of the code you attached (to be replaced and the new one) seem identical (unless I overlooked some details...). Can you check it, please? It would be very helpful!
Leave a Reply
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.