enableNextButton with time measureing question | XM Community
Skip to main content
Solved

enableNextButton with time measureing question

  • February 26, 2020
  • 3 replies
  • 14 views

benjaminschlegel
Hi all I have a question where I disable the next button at the beginning and enable it as soon as they answered all questions generated with JavaScript. The mechanism works as long as I do not add a timing question (to measure the latency) to the block. As soon as I do that the button stays enabled from the beginning. It also did not work when I remove all the code but the line this.disableNextButton();. The Timing Question is the default without any changes. Does anyone know how I can use "this.disableNextButton();" with a Timing Question?

Best answer by rondev

Put all the code in the setTimeout function as below

setTimeout (function () {
//All code goes here
},100);

3 replies

rondev
Level 6 ●●●●●●
Forum|alt.badge.img+22
  • Level 6 ●●●●●●
  • February 26, 2020

Instead of this.disablenextbutton
Try using

jQuery("#NextButton").hide();


jQuery ("#NextButton").show();


benjaminschlegel
> @rondev said: > Instead of this.disablenextbutton > Try using > jQuery("#NextButton").hide(); > > jQuery ("#NextButton").show(); Doesn't work either. The Button is displayed from the beginning.

rondev
Level 6 ●●●●●●
Forum|alt.badge.img+22
  • Level 6 ●●●●●●
  • Answer
  • March 2, 2020

Put all the code in the setTimeout function as below

setTimeout (function () {
//All code goes here
},100);