Countdown timer - Noob!!!
Posted 30 September 2006 - 05:14 PM
So is it possible to create a live countdown to show how long is left from the unix timestamp stored on my SQL database (can be placed into a variable in php)?
And if so, is it possible to set it so that upon reaching the time 00:00:00 to refresh the page?
I've never done any JS before so if anyone could help id be greatful
Posted 30 September 2006 - 07:22 PM
That should count down from 100 seconds, but it wouldn't stop at 0. You'll need to beef it up by creating a function that refreshes (or stops) when the counter hits zero. You'd probably also want to write an interpreter that would convert the seconds to days, hours, minutes, and seconds. For example, instead of 10,000 seconds, the visitor would see 2:46:45.
Here's some info on setTimeout and setInterval
Posted 01 October 2006 - 05:51 PM
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users