Comments (5)
Is jatos.urlQueryParameters deprecated?
No, it's not. I just tried it and it worked for me, returning an object. How do you call it in JS?
And it looks like the URL in the Reference seems to be a past version. The URL now does not contain the start?.
Yes, you are right, it's outdated. I'll update it. Thank you for pointing this out. Please, if you find more of those, tell me ;)
from jatos.
I use console.log(jatos.urlQueryParameters)
at the top of the body part in my JS. The output in the console is as follows.
I also try to use the URL "http://127.0.0.1:9000/publix/[code]?foo=bar&a=123"
, but the output is still undefined.
from jatos.
I made a mistake in the updated docs: the first one is an ? - not an &. So it has to be http://127.0.0.1:9000/publix/[code]?foo=bar&a=123
like you already used :)
But it works for me. I just tried it:
Though you can only call it after jatos.js initialized. So, you have to call it from jatos.onLoad
(https://www.jatos.org/Write-your-own-Study-Basics-and-Beyond.html#mandatory-lines-in-your-components-html):
jatos.onLoad(function() {
console.log(jatos.urlQueryParameters);
}
from jatos.
Oh, that is indeed the main reason. But that means there seems to be no way to change my jspsych component parameters based on the prolific PID. Or I can define the component after jatos is initialized.
I'll try that later. Thanks for your help.
from jatos.
It should be no problem: The easiest is to just wrap all JS you have, including all jsPsych code, with jatos.onLoad
:
jatos.onLoad(() => {
// everything goes in here
}
from jatos.
Related Issues (20)
- Can not open loader.bat successfully on win11 HOT 2
- Terraform Config HOT 2
- “This study run is invalid” HOT 36
- Abort button problem HOT 4
- Bug - result data exported as Plain Text have line-breaks removed
- Customize login page HOT 7
- Fatal glibc error: CPU does not support x86-64-v2 HOT 7
- JATOS POST failed with jatos.uploadResultFile HOT 1
- Study Results of a specific worker shows results of all workers of that type instead of only one
- Session cookie doesn't get deleted after log-out causing logout not being successful
- Result files stored in the wrong folder HOT 2
- Include personal link comment in metadata HOT 1
- Getting zip while trying to pull study results via API as JSON HOT 6
- MySQL authentication protocol HOT 1
- Couldn't save result files as csv or json HOT 1
- Local JATOS doesn´t work, weird layout HOT 10
- Local JATOS is working, but no log in on web browser possible
- MySQLCharsetFix failed HOT 2
- Import two jspsych-builder components into jatos
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from jatos.