Topic: Need help on Javascript Timer

I need to display a time remaining count down on a page.
I stored the time remaining on the server so each time the page reloads it will 'synchronise'  the time with the server.
I need the javascript to continue counting down from the value provided by the server.
When it goes to zero it will call the server via ajax.
1)How do I send in the time remain to be displayed in the javascript, and what formating do I need to take care of?
I can either process it as a hidden element or an argument in the controller.
2)How do I add a ajax call to the server when time goes to 0?
When Page load Server gives remaining time to client.
Client JS just needs to count down from that given time left.
Everytime the user submits the Time remaining will be refreshed
When Time == 0 javascript calls a method to the server

Last edited by limgw (2012-06-21 01:45:08)

Re: Need help on Javascript Timer

test