Hello all,
Recently, I am using the Adobe LiveCycle to create a form with a countdown. I keep receiving a error of "App is undefined" under the Log tab in report window.
Great if someone can give me some clue on this as my colleague has left a sample for me and it works well. I just copy his code to a new file to try to replicate the result but did not work.
Thanks,
Oli
The code is as below:
*************************************************
timer_test::ready:form - (JavaScript, client)
xfa.form.timer_test.variables.countdown.value = "90";
var second = 1000;
timer_test.page_01.timer_text.rawValue = xfa.form.timer_test.variables.countdown.value;
dummy = app.setInterval("xfa.form.timer_test.variables.timer.DoTimers()", second);
timer_test.#variables[0].timer - (JavaScript, client)
function ClockProc(nCurTime)
{
xfa.form.timer_test.variables.countdown = String(Number(xfa.form.timer_test.variables.countdown.value)-1);
if (Number(xfa.form.timer_test.variables.countdown.value) <= 0)
{
timer_test.page_01.timer_text.rawValue = "time out";
timer_test.page_01.timer_text.font.fill.color.value = "255,0,0";
}
else
{
timer_test.page_01.timer_text.rawValue = xfa.form.timer_test.variables.countdown.value;
}
}
function DoTimers()
{
ClockProc();
}
********************************************************
dummy = xfa.host.setInterval("xfa.form.timer_test.variables.timer.DoTimers()", second);