Javascript image load not working on consecutive pages | XM Community
Skip to main content
Hello!



I am using javascript to select and present an image to the survey respondent. However, using the exact same javascript and HTML codes on two consecutive pages does not work - e.g., You would see the first image on Page 1 just fine, but on Page 2, the same image does not load.



If I insert a random page in between Page 1 and 2 (e.g., a page with some text), Page 2 image loads fine. However this disrupts the flow of the survey, so I'd like to avoid doing that.



Has anyone else experienced this?



The HTML and javascript codes are attached. The attached codes are simplified versions of what I'm ultimately trying to do - hence the slightly convoluted code (like if-then conditionals).



I sincerely appreciate any help on this! Thank you.
I sort of have an answer to my question after trying different things. It seems that what I described (i.e., image not loading the second time it is called) occurs when the page transition is set to "slide." The problem resolved itself when I changed the transition to "none."

Leave a Reply