Replies: 3 comments 1 reply
-
Hi @gorkang, One problem that you'll face is that JavaScript running in the browser can't access (most of) the local file system. So you can't, for example, directly edit a .json file from browser JS, even if you are running the script locally. I believe that the closest you could come is to use something like IndexedDB. The solution that I would recommend is to run a lightweight web server on your local computer. If you use a node.js-based server, for example, then you can access files on the disk through node.js, and your jspsych scripts can communicate with the server via |
Beta Was this translation helpful? Give feedback.
-
Thanks for your response Josh. IndexedDB might be what we were looking for. We will try to adapt your "library to communicate with a MySQL database" to use IndexedDB in the following weeks. If we manage to get something useful we will share it. We want the system to be as portable as possible, and sometimes installing something in the local computer is not an option. A typical use case would be going to a school with the experimental protocol in a pen drive folder and just executing an index.html. |
Beta Was this translation helpful? Give feedback.
-
Hi @gorkang, If I understood well the problem is about balanced conditions. I'm not sure if it answers the question but may be it could help ! Franck |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
In this comment, Josh links to a library to communicate with a MySQL database and do things like assign subjects to conditions "in a (somewhat) balanced manner".
When working with a server this should work great, but not so much when running experiments in a lab setting locally, where the same computer is used for multiple participants. This is common in places where internet is not very reliable, or when one does not have/wants access to a server.
Any idea about what would be the best way to assign subjects to conditions in a balanced manner locally/offline?
Maybe adapting the above MySQL solution to a set of local plaintext files, or JSON files could work? (having a JSON file for each MySQL table? table_register.json, table_conditions.json and table_data.json)
How are you folks doing this?
Thanks in advance!
Beta Was this translation helpful? Give feedback.
All reactions