Howdy, Stranger!

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

Supported by

Where should all these scripts should be put into?

I am trying to combine an osweb experiment with a follow-up survey. I found all the necessary steps that one needs to follow BUT I cannot figure out where exactly one should put all these fancy scripts such as


On the assumption that not anybody is a programmer, could somebody explain where exactly the necessary scripts should be placed?


  • Hi,

    jatos.startNextComponent() is a function that you will need to include at the end of the JavaScript generated by OSWeb.

    As far as I know/remember, OSWeb already includes by default this function at the end of the JavaScripts so you shouldn't need to include that. Check if you already have that function in your .html file, or if (maybe if you are using an older OSWeb version) your script includes jatos.endStudy(). If that's the case, you'll have to replace that function.

    However it sounds to me like you are confused on one step before. In order to help you better, you can describe the steps you followed to combine the two studies and tell us what didn't work. We can take it on from there.



  • Dear Elisa,

    I thank you for your prompt reply and your kind consideration. About my case, I tried to set up an experiment and then distribute a follow-up survey. In the experiment, my participants will be supposed to decide whether pair of adjectives (or words, or phrases). After that, I would like to add a few follow-up demographic questions (e.g., gender, age, and education level), and some relevant questions (mainly their attitudes towards psychological needs)

    After dozens of trials and errors, I managed to run my "experiment" which seem to run smoothly both in opensesame and in chrome. But I cannot integrate the two surveys into one. (and more important to get the unique coding for participants so as to match their responses across the two parts (i.e., the experimental and the survey).

    In attach you can see the experiment (called "pairs") and the survey (actually, for the time being, it is one of the survey examples offered by JATOS).

    I would very much appreciate it if you could offer some hints about that.

    I cannot for instance figure out where I should go to do the steps you describe above - i.e., jatos.startNextComponent() is a function that you will need to include at the end of the JavaScript generated by OSWeb. Where exactly can I go to find these commands?

    I am looking forward for your input.

    Thanks a lot.

    PS. I am attaching the osexp experiment and the jac and jzip files from my JATOS.

  • Hi,

    I fixed your study, download it from here and simply import it into JATOS (on the top bar, go to Import Study to import the jzip directly).

    What you had to do was copy all the files from the Demographics example into the same folder (within your Study Assets directory, which you find on the bottom of the homepage of your local JATOS: http://localhost:9000/, see "Where are my files").

    The study folder has to look like this:

    You might notice that the files of the demographics example are now packed inside a subfolder within your study. I made sure that demographics.html, which is the HTML file associated with your second component, is in the main (top) folder. All the rest are in the survey-js subfolder to keep a bit of order and not mix files from your OSWeb study with the others. But you can change this, if you change the paths in the corresponding HTML file, as I show you below.

    And, I also updated the paths in the demographics.html file, now the script looks like this:

        <script src="survey-js/javascript/jquery-3.1.1.min.js"></script>
        <script src="survey-js/survey-jquery/survey.jquery.js"></script>
        <script src="jatos.js"></script>
        <link rel="stylesheet" href="survey-js/bootstrap-3.3.7/css/bootstrap.min.css">
        <link rel="stylesheet" href="survey-js/study.css">

    (The old path definition works too but is a bit more confusing and it was for an old JATOS version. Hopefully these paths make clearer where files should go).

    Hope this helps


  • Dear Elisa,

    I am grateful to you and your assistance. After the changes you made, it works and it works perfectly! I never realized that it could be done in that (relatively easy) way.

    Before thanking you for one more time, please allow a general comment by someone who fits the description of a novice user: I think that providing some more details about some steps that should be followed could help those who know almost nothing about programming. Two examples:

    1. People, like me, may not notice that JATOS and JATOS local are not the same (I spent a lot of time to find out that the Study Assets directory, can be found on the bottom of the homepage of my local JATOS. The reason is that local JATOS and server-based JATOS are almost identical. So, I guess that this should be highlighted for future users; they need to know the difference of it (honestly, the instructions of "clicking the .bat" file to activate the local JATOS may not be suffice because it does not only require to click the .bat file but also to carefully read what the pop-up window says there to activate the local JATOS.
    2. People, like me, may not know where they should put the syntaxes (like the one you provided above). Unless I am wrong, one needs to open the HTML file and press cntr + Shift + J so as to see the code and where to add <head> etc. Am I correct?

    In any case, thanks a lot!


  • Dear Thanasis,

    Happy to hear it works, and thanks for your feedback. We do have rather thorough documentation in, but I agree all this is a bit difficult to make sense of, if you have very little programming background or knowledge of internet technologies.

    If one day we get funding to work on JATOS, we'll make sure to improve the docs :)



Sign In or Register to comment.

agen judi bola , sportbook, casino, togel, number game, singapore, tangkas, basket, slot, poker, dominoqq, agen bola. Semua permainan bisa dimainkan hanya dengan 1 ID. minimal deposit 50.000 ,- bonus cashback hingga 10% , diskon togel hingga 66% bisa bermain di android dan IOS kapanpun dan dimana pun. poker , bandarq , aduq, domino qq , dominobet. Semua permainan bisa dimainkan hanya dengan 1 ID. minimal deposit 10.000 ,- bonus turnover 0.5% dan bonus referral 20%. Bonus - bonus yang dihadirkan bisa terbilang cukup tinggi dan memuaskan, anda hanya perlu memasang pada situs yang memberikan bursa pasaran terbaik yaitu Bola168. Situs penyedia segala jenis permainan poker online kini semakin banyak ditemukan di Internet, salah satunya TahunQQ merupakan situs Agen Judi Domino66 Dan BandarQ Terpercaya yang mampu memberikan banyak provit bagi bettornya. Permainan Yang Di Sediakan Dewi365 Juga sangat banyak Dan menarik dan Peluang untuk memenangkan Taruhan Judi online ini juga sangat mudah . Mainkan Segera Taruhan Sportbook anda bersama Agen Judi Bola Bersama Dewi365 Kemenangan Anda Berapa pun akan Terbayarkan. Tersedia 9 macam permainan seru yang bisa kamu mainkan hanya di dalam 1 ID saja. Permainan seru yang tersedia seperti Poker, Domino QQ Dan juga BandarQ Online. Semuanya tersedia lengkap hanya di ABGQQ. Situs ABGQQ sangat mudah dimenangkan, kamu juga akan mendapatkan mega bonus dan setiap pemain berhak mendapatkan cashback mingguan. ABGQQ juga telah diakui sebagai Bandar Domino Online yang menjamin sistem FAIR PLAY disetiap permainan yang bisa dimainkan dengan deposit minimal hanya Rp.25.000. DEWI365 adalah Bandar Judi Bola Terpercaya & resmi dan terpercaya di indonesia. Situs judi bola ini menyediakan fasilitas bagi anda untuk dapat bermain memainkan permainan judi bola. Didalam situs ini memiliki berbagai permainan taruhan bola terlengkap seperti Sbobet, yang membuat DEWI365 menjadi situs judi bola terbaik dan terpercaya di Indonesia. Tentunya sebagai situs yang bertugas sebagai Bandar Poker Online pastinya akan berusaha untuk menjaga semua informasi dan keamanan yang terdapat di POKERQQ13. Kotakqq adalah situs Judi Poker Online Terpercayayang menyediakan 9 jenis permainan sakong online, dominoqq, domino99, bandarq, bandar ceme, aduq, poker online, bandar poker, balak66, perang baccarat, dan capsa susun. Dengan minimal deposit withdraw 15.000 Anda sudah bisa memainkan semua permaina pkv games di situs kami. Jackpot besar,Win rate tinggi, Fair play, PKV Games