How to move to a specific page using java script? | XM Community
Solved

How to move to a specific page using java script?

  • 26 January 2019
  • 4 replies
  • 37 views

Badge
I want to be able to send people to a page in the survey if they take too long on the current page. This is not the next page, so I cannot simply do a $(NextButton).run(). I also don't want to do it through Survey Flow because it will create another problem with the previous button on the following page. Any ideas?
icon

Best answer by TomG 27 January 2019, 04:18

View original

4 replies

Userlevel 7
Badge +27
Add a “too long” choice to your question and have it skip to where you want. In the JS hide the “too long” choice and have the timer code (the timer will have to be in JS, not a timer question) select “too long” and click the Next button on timeout.
Badge
Clever solution! Thanks!
Badge
> @TomG said:
> Add a “too long” choice to your question and have it skip to where you want. In the JS hide the “too long” choice and have the timer code (the timer will have to be in JS, not a timer question) select “too long” and click the Next button on timeout.

The problem is that now, there is a blink when the screen is displayed. It first shows the "too long message" (I decided to use a message rather than a radio button) and then it disappears. It is quick, but it is noticeable. I have been trying to do something changing color of the font, setting it to white and then changing it to black, but hasn't been able to make it work. Any idea?
Thanks
Userlevel 7
Badge +27
> @Mauricio said:
> The problem is that now, there is a blink when the screen is displayed. It first shows the "too long message" (I decided to use a message rather than a radio button) and then it disappears. It is quick, but it is noticeable. I have been trying to do something changing color of the font, setting it to white and then changing it to black, but hasn't been able to make it work. Any idea?
> Thanks

Add a `<div>` with a lot of height (e.g. 1500px) to the top of your question text to push the question off the bottom of the screen, then hide it at the of addOnReady.

Leave a Reply