Have an idea?

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

Delay navigation button

How can I delay the "next question" button for some seconds to make sure people read the text properly?

asked Nov 7, 2011 by anonymous
retagged Sep 1, 2016 by Walter Williams

2 Answers

+2 votes
Best answer
Download the zip file on the main site for delayed submit buttons, but the code included doesn't run on SSI7, the "submitbtn" in the code needs to be changed to "sys_next_button" and you have to use text based next buttons

<script type="text/javascript">

function disableNext ( )
  originalValue = document.mainform.sys_next_button.value;
  document.mainform.sys_next_button.disabled = true;
  document.mainform.sys_next_button.value = "Please wait...";
  setTimeout ( "countDown()", 1000 );

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

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

window.onload = disableNext;
var originalValue;
var timeOutRemaining = 154; //3 Seconds
answered Nov 8, 2011 by anonymous
edited Nov 8, 2011 by Walter Williams
+2 votes
this here is a small script that shows Next only when the movie stops playing.
<table border="0" cellpadding="0" cellspacing="0" width="100%">
    <object id="MediaPlayer" width=800 height=600 classid="CLSID:22D6F312-B0F6-11D0-94AB-0080C74C7E95" standby="Loading Windows Media Player components..." type="application/x-oleobject" codebase="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=6,4,7,1112">
<param name="filename" value="[%GraphicsPath()%]Film.wmv">
<param name="Showcontrols" value="false">
<param name="enableContextMenu" value="false">
<param name="SendPlayStateChangeEvents" value="True">
<param name="PlayCount" value="1">
<param name="autoStart" value="True">

<SCRIPT LANGUAGE="JScript"  FOR="MediaPlayer" EVENT="playStateChange(NewState)">

if (NewState == 0) 
    document.getElementById("submit_button").style.display = 'block'; 

In your case, you'd want to set the submit button to hidden on page load and start a javascript timer to set it back to block (visible) after a given time.
answered Nov 7, 2011 by Bahadir Ozkurt Gold (16,910 points)
edited Nov 7, 2011 by Bahadir Ozkurt