Superimpose next button on image

LobkeLobke Community Member Qubie ✭

Superimpose next button on image

Hi all,

I'm rather new at using JavaScript, so I would like some help if possible. I have eight trials in which a picture is shown like the one below. For every trial I have inserted a mouse tracking code (see attached file). Participants are asked to 'walk' from the blue dot at the bottom to the table. The code works perfectly, however the x and y coordinates of the mouse are only properly saved when the participant clicks on the next button. Since I'm interested in the walking path from the blue dot to the table I do not want to have output from the path from table to next button. I was wondering whether I could superimpose the next button onto the laptop on the table in the picture. If so, what code is needed for this? I would really appreciate any help.

P.s. If you have any other/better ideas on how to stop the mouse tracking when reaching the laptop, I'm all ears.


  • TomGTomG Raleigh, NCCommunity Member Wizard ✭✭✭✭✭

    You can use an image map that defines the area of the table, then attach an event to the table area that clicks the next button.

  • LobkeLobke Community Member Qubie ✭
    edited April 2

    Hi TomG, thank you for your response. I have made the image map and defined the table as an area. I have also added a click event. However, when I preview the questionnaire, it does not work. What goes wrong?

  • LobkeLobke Community Member Qubie ✭

    Sorry forgot the code

Sign In to Comment