Questions tagged [jspsych]

A JavaScript library for creating and running behavioral experiments in a web browser.

71 questions
0
votes
0 answers

(jsPsych) How can I get access to the user response before the trial finishes?

I have a html-button-response trial that shows images and takes user input from clicking the button. I want to know what response the user gave BEFORE the trial ends. I can't find this anywhere in the docs or issues. I know there is a way to get it…
Zio-4
  • 189
  • 2
  • 12
0
votes
0 answers

Update image button src onclick for subsequent trials

I’m coding an experiment with a 12x12 grid of image buttons in jsPsych. Participants receive feedback based on which squares they choose to click. These squares are all initially white (white squares are saved as an img file called “old”) but after…
jl89
  • 1
  • 1
0
votes
0 answers

"jsonpointer is not defined"

I'm a university student and I'm working with JsPsych on a Jatos server. Doing an excercise I receive an error about my jspointer. Exactly the error is: Uncaught ReferenceError: jsonpointer is not defined at jatos.batchSession.get (jatos.js:774:13)…
0
votes
0 answers

Remove mouseview.js aperture with jsPsych

I don't really have any experience with JS. That being said, I am working on an experiment where I am using jsPsych and MouseView.js to build the experiment. I am using MouseView.js's demo and am wondering how I'd remove the aperture that it adds at…
0
votes
0 answers

How to recall a jsPsychHtmlButtonResponse?

I am trying to design a game for an experiment. The game involves recognizing emotions and clicking a button to respond. Now I am onto the next stage of the experiment where participants get a response for the button they clicked (ex. Incorrect,…
mp90ua
  • 1
0
votes
1 answer

Saving JsPsych data from HTML as CSV

I've been trying to save a CSV file to my local computer, with the data from the HTML experiment that runs from the script, but I only ever end up with a new webpage showing all of the data, when finishing my experiment...I think it is mostly the…
0
votes
0 answers

How to show multiple images at once with a jspsych plugin?

I am coding in Gorilla and try to show multiple images at once using a JsPsych plugin. Currently I am using the plugin jsPsychImageButtonResponse as follows: var trial = { type: jsPsychImageButtonResponse, stimulus: [aURL, bURL, cURL], …
Fee
  • 1
  • 1
0
votes
2 answers

Simultaneously sampling from two variables in jsPsych

I am using jsPsych to create an experiment and I am struggling to sample from two variables simultaneously. Specifically, in each trial, I would like to present a primeWord and a targetWord by randomly sampling each of them from its own variable. I…
Pablo Bernabeu
  • 402
  • 4
  • 23
0
votes
1 answer

Click on event causing change in pseudo class style

I'm trying to hack the jspsych's slider bar component. So in jspsych's source code, they have .jspsych-slider { appearance: none; -webkit-appearance: none; -moz-appearance: none; width: 100%; background:…
0
votes
1 answer

Uncaught TypeError: e.type is not a constructor and trial level node is missing the "type" parameter errors

I'm pretty new to coding and I'm currently trying to display two graphs using chart.js. My hope is to have them display one after the other after some text appears on the screen. The text shows up fine, but once I move to where the graphs should be,…
codebaby
  • 1
  • 1
0
votes
1 answer

Why doesn't my function log the given responses, jsPsych

I'm trying to learn jsPsych and tried following along with a video tutorial and I ran into a problem. The intention was to create a function that adds wether a given response to a stimulus was correct or incorrect to the data that is to be displayed…
Niyori
  • 1
  • 1
0
votes
1 answer

Why does my element have a scrollbar even though it fits its container?

I am writing code in jsPsych (a JavaScript library) and am trying to display a + on my screen. The + has a maximum height of 85vh and a maximum width of 85vw, though it does not reach either because it is only 60px. However, even though the + fits…
puzzleGuzzle
  • 101
  • 10
0
votes
0 answers

Creating an experimental stimuli in JsPsych

I am a beginner in jsPsych and am trying to build an experimental task in which there will 3 boxes within which there will be a bar with varying values. The boxes should be occluded and when the participant hovers their mouse over the boxes with…
AkB
  • 1
  • 1
0
votes
1 answer

Text_align parameter for questions in jsPsych survey-text plugin

I am using jsPsych Survey-Text plugin (version 7.2) to create a questionnaire. I'd like to align all the questions on the left. What kind of parameters should I add to the codes? Is it possible to change font family/size of the questions? Thank you…
Iris
  • 1
0
votes
1 answer

Enabling forced choice in jsPsychSurveyLikert

I am new to jsPsych and wonder if there is a way to enable forced choice in the jsPsychSurveyLikert in 7.1.2. I want to avoid missing data and therefore I would like to specify this. For example for jsPsychMultiChoice it is possible to do this by…
CapsLock
  • 11
  • 3