Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Supported by

Does JATOS support running multiple components of jsPsych7?

Hi, all.

I want to run multiple components of jsPsych 7 (7.1.0) sequentially on JATOS version 3.6.1. For example, the first component is to get the demographic data, and the next component is to run the working memory task.

I could do it with jsPsych 6, but I ran it with jsPsych 7 according to the JATOS example (https://www.jatos.org/Example-Studies.html), it terminated at that component and did not proceed to the next component.  For example, when I tried to execute the Simple Reaction Time Task followed by Demographic and Survey Questions, it terminated with the Simple Reaction Time Task. However, if the Simple Reaction Time Task is executed after the Demographic and Survey Questions, it can be completed.

Is there anything I need to do when using the component with jsPsych7 in JATOS?

Comments

  • edited January 2022

    Hi,

    Sorry for the delay, for some reason we did not get notified of your post.

    Did you solve it in the meantime? If you didn't, could you please check which is the command that you have on the on_finish callback? (I think that's how it's called).

    If you open your script, you should see either a call to

    jatos.endStudy`
    

    or

    jatos.startNextComponent
    
  • It's strange, I also wasn't notified of the post :/. JATOS works with jsPsych 7 (the Simple Reaction Time Task exists with jsPsych 7 in the Example Studies). jsPsych 7 has a little different syntax then 6. I'd recommend to have a look at the example study and the new docs: https://www.jatos.org/3.7.1/jsPsych-and-JATOS.html.

  • Hi @elisa , @kri ,

    Thank you for your reply. I didn't get notified of your reply either. Hmmm. That's strange.

    I used the "jatos.endStudy", based on the Simple Reaction Time Task with jsPsych 7 in the Example Studies that @kri recommended. Should I use the "jatos.startNextComponent"?

  • Hi @elisa , @kri ,

    I solved it😁I was able to open the next component using the following code.

    var jsPsych = initJsPsych({
    
      on_finish: () => jatos.startNextComponent(jsPsych.data.get().json())
    
    });
    

    Thank you so much!

Sign In or Register to comment.