Hi,
I used to use the code below to disable the 'Next' button for a specified time. It replaced the next text with a countdown timer. With this newer software this no longer seems to work. Can anyone tell me where this broke? I assume it is simply a reference to how the next button is called.
<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 (" + timeOutRemaining-- + " seconds)";
setTimeout ( "countDown()", 1000 );
}
function countDown() {
document.mainform.sys_next_button.value = "Please wait (" + timeOutRemaining + " seconds)";
if(timeOutRemaining > 0) {
timeOutRemaining--;
setTimeout("countDown();", 1000);
} else {
enableNextButton();
}
}
function enableNextButton ()
{
document.mainform.sys_next_button.disabled = false;
document.mainform.sys_next_button.value = originalValue;
}
window.onload = disableNext;
var originalValue;
var timeOutRemaining = 30; //30 Seconds
</script>