Have an idea?

Visit Sawtooth Software Feedback to share your ideas on how we can improve our products.

add something else while next buttom is delayed

I have this code for delaying the next bottom to appear, but I want to improve it.

<script type="text/javascript">

Is it possible to make it gray before they can actually the real next bottom appear? Or is it possible to add a text saying "next button is about to appear"? or something similar while they are waiting.
This is so respondents dont believe the webpage has broken and leave the survey.
asked Jun 14, 2016 by Valeria Toledo

1 Answer

+1 vote
Hi Valeria,

Please use below code while you using text button:

<script type="text/javascript">

function disableNext ( )
  originalValue = document.mainform.next_button.value;
  document.mainform.next_button.disabled = true;
  document.mainform.next_button.value = "Please wait (" + timeOutRemaining-- + " seconds)";
  setTimeout ( "countDown()", 1000 );

function countDown() {
    document.mainform.next_button.value = "Please wait (" + timeOutRemaining + " seconds)";
    if(timeOutRemaining > 0) {
              setTimeout("countDown();", 1000);
        } else {

function enableNextButton ()
  document.mainform.next_button.disabled = false;
  document.mainform.next_button.value = originalValue;

window.onload = disableNext;
var originalValue;
var timeOutRemaining = 15; //3 Seconds

answered Jun 14, 2016 by Saurabh Aggarwal Gold (34,700 points)
I am not using a text button, I am using a normal arrow for clicking next that is being delayed 10 secods. However, I want something to appear while respondents are waiting for the delayed buttom so they don't think something is wrong with the questionnaire.

I tried to use your code and is not working , not really sure why.

Yes, this code works with Text button. Just try once!

I will check if we can modify this one for Graphics button.
Hi, we don't have a text button option in our software. The options are either graphics or button. And it works for neither of them. Does this depend on the version of the software one is using?