Hi there to all, I have the following problem: I want to extract a timestamp (a) from a mysql database (future value) and display a countdown timer (minutes and secs) in a box from the present timestamp (b). When the countdown reach zero I want a msg to be displayed along with a submit button in the browser and a new function fired that will set the timestamp (a) to zero in the mysql database. Can anybody give me some hints of code here? thanks in advance!
You should use AJAX to get the timestamp without refreshing the page and when the AJAX's onReadyState == 4; you use document.getElementById() to populate a div with the value of a count down function (SetInterval()) and then have another script compare the countdown with the AJAX response (your timestamp) and if it == 0 then send another AJAX request to the server inputing the new timestamp. Well that's how I would do it. Hope it helps! ~imozeb