Expand my Community achievements bar.

Enhance your AEM Assets & Boost Your Development: [AEM Gems | June 19, 2024] Improving the Developer Experience with New APIs and Events

The timer stops at 10 seconds, how to fix it and make run without stopping ?


Level 3

Hi, Please help me, I have created a code that shows clock in livecycle PDF form in a TextField.

my problem is everything runs smoothly except 2 things :

1- the timer stops after 10 seconds then it gets less for the second run and less for the third run and so on...

2- I can not get to run the code without clicking a button, I can not run the timer in initialize or form ready or layout ready event ...

Please help me :

below is the codding for running the time and it's in click event of a button1 :

app.setInterval("xfa.form.form1.Page1.timer.jk()", 1000);

below is my script stored in (timer) script for the timer which is called by the app.setinterval in above:

function jk(){

var da = new Date();

    var h1 = da.getHours();

    var m1 = da.getMinutes();

    var s1 = da.getSeconds();


var timek =  h1 + ":" + m1 + ":" + s1;

form1.Page1.TextField1.rawValue = timek;}

0 Replies