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
Apr 30, 2011 5:07 PM UTC

Thanks Paul,

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

Oli

Translate
Apr 28, 2011 5:53 PM UTC

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

Paul

Translate
New Participant
Apr 28, 2011 5:37 PM UTC

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

Translate
Jan 21, 2011 2:40 PM UTC

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

Translate
Jan 19, 2011 9:08 PM UTC

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.

Translate
New Participant
Nov 30, 2010 8:19 PM UTC

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.

Translate
Nov 23, 2010 1:55 PM UTC

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.

Translate
Nov 23, 2010 11:17 AM UTC

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


Translate
Thom_Parker
Level 4
Oct 19, 2010 4:26 PM UTC

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)

Translate
Oct 19, 2010 11:59 AM UTC

> 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()

Translate