0% found this document useful (0 votes)
10 views

Javscript Clock

javascript clock code

Uploaded by

dogeha7350
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
10 views

Javscript Clock

javascript clock code

Uploaded by

dogeha7350
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

http://www.pdfscripting.

com

JavaScript Clock/Timer Demo


Stop Timer
by Thom Parker WindJack Solutions, Inc.
We can make clocks and timers in a PDF by combining the date object with a timer. Timers are created in
Acrobat JavaScript with the “app.setInterval()” function. As arguments this function takes the length of
the timing interval in milliseconds and some JavaScript code to execute. In this file, the timer code is in a
Document Script named “ClockCode”. The Timer control buttons below set state variables used in the
timer function to control the internal time calculations and the display. The timer must be cleared before
the document is closed. This is done with the “app.clearInterval()” function in the “WillClose” Action.

Continuous Clock: 4:57:56 pm 24 hour Local Portland Hyderabad


UTC New York Tokyo
Sunday Aug 17, 2008

Stopwatch:
00:00:00:00 Start Stop Pause Clear
Stopped

Count Down Timer: Start Stop Clear


00:00:00:00
Set Hours: +10 -10 +1 -1 Set Minutes: +10 -10 +1 -1 Set Seconds: +10 -10 +1 -1

Copyright 2006 by Windjack Solutions, Inc. www.windjack.com

You might also like