Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Pausable stopwatch or clock Script

Status
Not open for further replies.

allancsr

Technical User
Oct 25, 2000
7
0
0
US
Hi,
I need to have a countdown timer script for a web page that can be set to a negative time like -30:00.
It would then count to 00:00 and continue on indefinatly.
I have founds lots of clocks and stopwatches that would put something simular on webpages.
Here is the problem.
I need to be able to pause the countdown and restart at the same time. Like NASA on a space launch.
This countdown view should be on one webpage and the controls for the timer on another page.
The timer need to be seen in real time by all who log on to the page.
I look forward to any help form the guru's of Tek-tips.
Thnaks
Allan

 
will both pages, the control page and the countdown page, be open at the same time?

Will all users who come to the site be looking at the same time?
 
Yes & Yes :)
Yes It will be necessary for both pages to open at the same time.

Yes all users will look at the same time.

Thanks for asking!

 
Unfortunately this cannot be done fully in javascript as the only way for all users to see the same time is by getting the time from a common place to all users, which is the server, not the client browser.

You will have to provide some sort of method of retrieving a time from the server and displaying it on the client at specified intervals. You could use an applet or maybe have a frame on the page that refreshes every 1 sec (if that is the time interval for your timer).
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top