6 Replies Latest reply on Jun 21, 2017 11:23 AM by tarekahf

    App is undefined... Help

    oleung Level 1

      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 to test and it works fine. But when I copy the code to a new file to try replicating the result but did not work at all.


      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();
      }
      ********************************************************