maraudir
11-16-2012, 10:08 PM
I have an Adobe LiveCycle document with some javascript in it. My main issue is with a countdown timer I am trying to use. I had no luck with setInterval and limited success with setTimeout.
function TimedOut() {
app.alert ("The time has elapsed");
//cancel the timer
app.clearInterval(timeout);
}
//prompt for number of seconds
var secondCount = app.response("Enter number of seconds", "Number of Seconds", "", "")
//start counter
if (secondCount >= 0)
//timer set for thousandths of a second
var timeout = app.setTimeOut("xfa.form.gameform.money_game.start_time.TimedOut()", (1000*secondCount));
Any help would be appreciated. I can only get the above code to work on 6 seconds or less.
function TimedOut() {
app.alert ("The time has elapsed");
//cancel the timer
app.clearInterval(timeout);
}
//prompt for number of seconds
var secondCount = app.response("Enter number of seconds", "Number of Seconds", "", "")
//start counter
if (secondCount >= 0)
//timer set for thousandths of a second
var timeout = app.setTimeOut("xfa.form.gameform.money_game.start_time.TimedOut()", (1000*secondCount));
Any help would be appreciated. I can only get the above code to work on 6 seconds or less.