Interactive Slider in OSWeb
Hello!
I am struggling to create a slider that shows and alters the current selected value while moving it in OSWeb. It should also be possible to log this value after the participants confirmed their decision.
Since I think I have to do this in JavaScript, I found some very cool codes for sliders. However, I only manage to recreate the html part with the inline_html script. The JavaScript part in the script tag (see screenshot) does not work. Also not if i put it in the inline_javascript item. Resulting in no changing values.
My first question is: Is it possible to combine inline_html and inline_javascript and is this even the right approach for my purpose? Or do you may suggest another solution?
Second: In Python I programmed this slider with the PsychoPy package in OpenSesame which perfectly fitted my needs. Is something similar like the PsychoPy visuals possible in OSWeb/ in JavaScript in OpenSesame? If yes, I would be super happy for some tips.
Thank you so much!!
Kind regards,
Kai
Comments
Hi @Kai ,
In older versions of OSWeb,
<script>tags were ignored when they were embedded in aninline_htmlitem. However, that should be fixed now. Can you try updating to the latest version of OSWeb (currently 1.4.12) and try again?Other than that, your approach seems fine.
— Sebastiaan
Check out SigmundAI.eu for our OpenSesame AI assistant!