Delay custom button using javascript | XM Community
Skip to main content
Question

Delay custom button using javascript

  • January 15, 2020
  • 0 replies
  • 41 views

I have a survey block with a multi-page timer built in javascript, ensuring that respondents are auto-forwarded after ten minutes. The code hides the next button and presents a "check"-button to participants to advance within the block. The code runs nicely. However, I'd also like to hide the "check"-button a few seconds for every new page. The code below seemed initially ok to me; it displays the "check"-button after the participant has been on the page for three seconds, but when I click on the "check"-button nothing happens. Any ideas what might be going wrong here? Many thanks! Ing _____________________________ this.hideNextButton(); var delayInMilliseconds = 3000; setTimeout(function() { $('NextButton').insert({before: "<input id=\\"checkButton\\" type=\\"button\\" value=\\" >> \\" title=\\" >> \\">"}); }, delayInMilliseconds);