Custom JavaScript will not work with built in Timer question | XM Community
Skip to main content
Hello everyone. I hope someone can offer some guidance.



I have an image (will be a button on my actual survey) which is a link that will load another website in a new tab/window. I want to insure that I know the user has clicked the button and the link has loaded, so I created custom JavaScript for the question that disables the Next button until the user clicks the button. Good news: my custom JS works. However, I also want to time how long the user spends before clicking the next button. I've done this by adding the built in Timer question from Qualtrics. Bad news: this breaks my custom JS. I am assuming that the Timer question utilizes the same method in JS that activates the Next button.



I have a test survey found here: https://ohio.qualtrics.com/jfe/form/SV_b7rF87q3onKJRZP. The first question is the one that works (no timer) and the second question is the one that doesn't work (with the timer).



Here is the HTML for my question in the example:

!





Here is my custom JS:

_NOTE: I've tried in both addOnload() and addOnReady()_

!





Here are the settings for the Timer question:

_NOTE: I've tried visible and invisible._

!







Any help is much appreciated! Thank you in advance,



KDM
Be the first to reply!

Leave a Reply