Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

Adobe Summit 2023 [19th to 23rd March, Las Vegas and Virtual] | Complete AEM Session & Lab list

Using the app.setTimeOut Method

Avatar

Not applicable
Ok, I really need help here. Ive been trying to get the app.setTimeOut method to work to no avail. Ive tried accessing a script object that I have many functions in with no success. Then I just tried to place functions into the script where I editing thinking that maybe because the script object is part of the xfa form object I couldnt access them through the app object,(or I was just using the wrong syntax) so that maybe if I placed the functions onto the same script and called them from there via:



app.setTimeOut(myFunction(),3000);



No dice. Ive tried all kinds of arrangements in quotations, (single quotes, double quotes, no quotes, etc.) and nothing. What Im trying to do is have a web service perform a query and bring back a string from the database if an object is found, then Id like for Acrobat to wait for a prescribed time before checking if the database actually returned a string value, or if it did not and display a message indicating that either it did return something or it did not.

I know that the app.SetTimeOut can see the function call Im making, because when I wasnt using quotes around the function (in the setTimeOut method) It was immediately displaying the messages. But when I put quotes around it nothing happens. Can someone help me?



Mike
4 Replies

Avatar

Level 10
You will have to path completely to the function. Something like this:



app.setTimeOut("xfa.form.form1.Page1.myScript.Test()", 1000);

Avatar

Not applicable
Ok I just tried that, but it still didn't work. I've also tried writing the function code, under and above, the app.setTimeOut method and have had no success. When I do this the function runs, but does so immediately, no timeout. Thanks for your help on this.



Mike

Avatar

Level 10
It is probably a problem with the path to your function .....do you want to post it to livecycle8@gmail.com and I will have a look.

Avatar

Not applicable
Ok I just sent some scripts. Let me know if you would like to take a look at the entire form.