Howdy, Stranger!

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

Supported by

JATOS: Uncaught TypeError: URL is not a constructor when using jatos.submitResultData

I am new to using JATOS and am struggling to figure out to save data.

using jatos.submitResultData({"example_data":data}) I get the error 'Uncaught TypeError: URL is not a constructor'

How do I resolve this?

Comments

  • jatos.submitResultData() and jatos.appendResultData() are the functions to save data in JATOS' database. There is also jatos.uploadResultFile() if you have larger data like images or audio (https://www.jatos.org/jatos.js-Reference.html#result-data-and-result-uploaddownload-files).

    Your function call looks fine. If I try

    jatos.submitResultData({"example_data":"test"})
    

    it works with my JATOS. How does the rest of your study look like? Which JATOS version do you use?

    Best,

    Kristian

  • I'm using version 3.6.1

    The rest of my study is written using jsPsych, except for the opening page which was written by a collaborator and that defines a variable called URL, I wonder if it is this that is causing the error.

    I will remove the first page for now and see if I can now save data.

  • Okay this is working now! I will have to rewrite the intro page but I think I should be able to save data now

Sign In or Register to comment.