Howdy, Stranger!

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

Supported by

Keyboard input not recognized in OSweb

Hi everyone,

First of all, great work on OSweb, it’s a great tool during covid to keep research going 😁


I've ran into a problem getting input for my experiment. I’m making an experiment where participants have to submit two keywords (in identical separate screens) with the goal of using that input later. I found code on the forums that works well, if you are only using one input screen. However, when I duplicate the code (and change the variables to avoid overwriting), the second instance doesn’t work. I’ve looked at the console logs in the browser and it seems it recognizes that there is input, but it doesn’t register the exact input. Any ideas what the cause of the problem could be? I’ve attached the experiment (just the two screens).


Best,

Tom

Comments

  • Hi @TIJ,


    response is a built-in variable, which is why the first script works. response2, on the other hand, is not. So you will first need to set response 2. You can do so by adding the following line to the beginning of your second inline_javascript item:


    vars.response2 = vars.response
    


    Good luck!


    Cheers,


    Lotje

    Did you like my answer? Feel free to Buy Me A Coffee :)

  • Worked like a charm, thank you so much!

Sign In or Register to comment.