Howdy, Stranger!

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

Supported by

Using the jatos.js JavaScript library

Hello,

I want to create a group study (similar to a n-player prisoners' dilemma).

Is there a way, that I can use the jatos.js JavaScript library in OpenSesame (OSWeb)? I need the group functions and variables. Jatos.org states that

<html>
  <head>
    <script src="jatos.js"></script>
  </head>
</html>  

and

<script>
  jatos.onLoad(function() {
    // Start here with your code that uses jatos.js' variables and functions
  });
</script>  

are mandatory lines to run jatos correctly and moreover, to use the variables and functions from their library. But as far as I know, I cannot work on the HTML code of my study (at least not when using the OpenSesame GUI). Is there any way I can implement such a study using OpenSesame? I am pretty familiar with OpenSesame but not so much with JavaScript.


Thank you!

Comments

  • Hi!

    OSWeb is using jatos.js, so it must be available somehow. But I'm not sure whether it is accessible for you. @seapsy, @Dan could know more here ;) .

    Kristian

  • hey, thank you for responding. I tried to access jatos variables (for example jatos.studyId) in the javascript inline script, but that didn't work. Received an error message that was something like "jatos not definded"

Sign In or Register to comment.