Java script only runs in preview; not when launching the Study | XM Community
Skip to main content
Solved

Java script only runs in preview; not when launching the Study

  • April 21, 2020
  • 2 replies
  • 170 views

Forum|alt.badge.img

Hi there,
My knowledge about java script is very basic; but I found this very cool java script online where participants can move two circles to indicate how close they feel to another person.
I have put the java script into the question and in the preview it works fine. However, if I activate the survey and then click on the link, it does not work anymore. When i try to put this question with the circles at the beginning of the survey it works well for some reason.
Can someone help?

Thanks a lot!


Best answer by TomG

It may be a timing issue related to page transition. Try changing addOnload to addOnReady.

2 replies

Forum|alt.badge.img
  • Author
  • April 21, 2020

image.png


TomG
Level 8 ●●●●●●●●
Forum|alt.badge.img+27
  • Level 8 ●●●●●●●●
  • Answer
  • April 21, 2020

It may be a timing issue related to page transition. Try changing addOnload to addOnReady.