Displaying queryParams in OSWeb/Jatos
Hi all,
I've created a Qualtrics survey that redirects participants to my OpenSesame/OSWeb Study in Jatos... I'm sending the parameter RandomNumber via URL
All good, works brilliantly, the final data contains everything... however, I would like to display to participants this RandomNumber in a Sketchpad...
I've tried things like:
1.Your number is [RandomNumber]
2 Your Number is [jatos.urlQueryParameters.RandomNumber]
And things are not going so well, how can I show this variable to participants?
Best,
Victor
Comments
Maybe try something like this:
var RanNum = jatos.urlQueryParameters.RanNum;
vars.RanNum = RanNum;
And then show them in the sketchpad using: Your number is [RanNum]
Hi,
How can I add this code to my experiment as it doesn't accept python inline scripts or changes in the general script?
Thanks :)
V
You can add an inline_javascript block. That's why that code follows the java syntax :)
Hi @JasperdeWaard, thank you, it worked!!!!
V
Glad I could help :)