Superimpose next button on image | XM Community
Question

Superimpose next button on image

  • 31 March 2020
  • 3 replies
  • 37 views

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.

3 replies

HTML code.docxSorry forgot the code

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?
Userlevel 7
Badge +27
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.

Leave a Reply