Expand my Community achievements bar.

Don’t miss the AEM Skill Exchange in SF on Nov 14—hear from industry leaders, learn best practices, and enhance your AEM strategy with practical tips.

Using the app.setTimeOut Method

Avatar

Former Community Member
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

Former Community Member
You will have to path completely to the function. Something like this:



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

Avatar

Former Community Member
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

Former Community Member
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

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