Javascript Clock
Javascript Clock
com
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
Sunday Aug 17, 2008
24 hour
Local UTC
Hyderabad Tokyo
Stopwatch:
Stopped
00:00:00:00
Start
Stop
Pause
Clear
00:00:00:00
+1 -1
Start
Stop
Clear
Set Hours:
+10
-10
Set Minutes:
+10
-10
+1
-1
Set Seconds:
+10
-10
+1
-1
www.windjack.com