Nhoj Posted October 21, 2006 Share Posted October 21, 2006 I have a value stored in the database as seconds until something happens and I was wondering how I'd make a countdown that counts down starting from that number of seconds and going to zero.Basically I want it to pull something like 3600 for 1 hour and countdown to 0. The part I can't figure out how to do though is make it count down based on just seconds, I have an older script that does what I need but it does it based on a date / time, i.e. Jan, 1st, 2006 5:00 AM, this worked but was a little fudged when people were in different timezones.I also need it to display in the format '00:00:00' (hh:mm:ss) and be able to countdown a maximum of 172800 seconds (48 hours). When it hits zero I also need it to show 00:00:00 instead of counting in the negatives.I'd prefer if the javascript simply updated a <span id=clock>[clock]</span> kind of thing, or even a div.I'm not too picky.....a disabled form input box would also work.If anyone can help I appreciate it and thanks in advance ;D Quote Link to comment Share on other sites More sharing options...
Nhoj Posted October 22, 2006 Author Share Posted October 22, 2006 NVM, I got it working ;D Quote Link to comment Share on other sites More sharing options...
fenway Posted October 22, 2006 Share Posted October 22, 2006 Care to post the solution? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.