Need to add a countdown timer to a Pdf | Community
Skip to main content
This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.

14 replies

New Participant
April 30, 2011

Thanks Paul,

I'll take a look. But if my memory is good, I should already pick Javascript.

Oli

April 28, 2011

My guess is that you have configured the script as FormCalc and it needs to be Javascript.

Paul

New Participant
April 28, 2011

Hi everyone,

After spending some time on following the sample.

By using the Adobe LiveCycle Designer to construct the form, using app.setInterval(" ", 6000).

I keep seeing "app is undefined" under the Log window.

Any clue would be helpful.

Thanks,

Oliver

January 21, 2011

Sorry about the late reply.

I abandoned this in the end because I couldn't get in working in LiveCycle Designer.  The timer would update for a few seconds and then just stop.  I did not persevere because there was a bit of a rethink and we now plan to handle time-outs from the internet portal.

Good luck and if you find a satisfactory solution please do post.

Kieran

January 19, 2011

Where you ever able to get the countdown timer added in livecycle?

I am trying to get a countdown timer added from a time field. When the user enters a time I need to add two hours. I have a calculation script that works and shows when the must by completed time is and I want to have message boxes show up at 30 minutes intervals to say hey you have 30min and so on to complete the form.

New Participant
November 30, 2010

I need to do something similar myself, but not quite the same. I want a visible stop-watch (count up) timer on-screen in a corner when viewing my PDFs in "Full Screen" mode. I want it remaining there as I page through all the pages. (I'm using PDFs in landscape mode on a teleprompter, rather than a "scrolling" script.)

By the way, I am pretty proficient with InDesign CS3 but only with the basic stuff text and objects. I have very limited proficiency with scripts and javascript etc.

I'm hoping to find a plug-in that's essentially ready to go. Any suggestions would be greatly appreciated.

November 23, 2010

Keep an eye on your console.

Depending on what you want to do, either:

app.setInterval("xfa.host.messageBox('"+Test+"');", 1000);

or:

app.setInterval("xfa.host.messageBox(Test);", 1000);

In the latter case Test must be defined in a namespace available to the app object.

November 23, 2010

Hello there,

You very kindly responded to my query about a form time out.  I agree that app.setInterval() will suit my needs but I am still unable to get this code working.

For example:

app.setInterval("xfa.host.messageBox("+Test+");", 1000);

This code is placed in a field's form:ready event but no message boxes appear when I run the form.

I have seen it suggested that the form may need to be trusted or certified in some way, does this sound right to you?  If so do you know how I might go about certifying the form?

Many thanks,

Kieran


Thom_Parker
New Participant
October 19, 2010

LiveCycle forms and PDF documents are very different things.  The clock example is a native PDF document.  Importing it into LiveCycle will basically destroy it.  Both use Core JavaScript as the scripting language but each has it's own Document Object Model, or SDK.  And they use completely different form models.  However, the LiveCycle DOM is a sub-model of Acrobat JavaScript. So all of the non-form related code in the clock scripts will operate in a LiveCycle form, such as app.setInterval().  LiveCycle Designer doesn't recognize this code because it's focused entirely on the LiveCycle DOM, but Acrobat will recognize and run it.

BTW: the code in the clock sample is pretty complex.  Just the app.setInterval() function by itself should work for you.

Thom Parker
The source for PDF Scripting Info
pdfscripting.com

The Acrobat JavaScript Reference, Use it Early and Often
http://www.adobe.com/devnet/acrobat/javascript.html

Then most important JavaScript Development tool in Acrobat
The Console Window (Video tutorial)
The Console Window(article)

October 19, 2010

> Are there syntax variations between Acrobat an Designer?

No

> I need to make a very simple timer so I can time-out my forms.  Would you be able to point me to any examples of how this has been achieved in Designer?

http://forums.adobe.com/thread/648197

> For example Designer doesn't seem to recognise app.setInterval()

Designer doesn't recognise anything. Adobe Reader/Acrobat is the client running the javascript's, and it recognises app.setInterval()