Does anyone know of any script that is basically a looping stopwatch that continues to run server side even if you close the web page & go back? Been googling around but all i can find are ones that you load page up, click start & if you refresh page its reset & I need a continuous running timer that counts down to 0 & then starts counting down again.
Anyone got any idea's where I can find one?
You would use a cookie to store the information in to client side.
You would need to store a reference to when the stopwatch / timer was started, a reference to the time when the page was closed and a reference to when the timer is to be considered lapsed and or ended.
So each load of the page would result in the cookie being loaded, the existing data deleted (as in delete the cookie) then on page close set a new cookie with the above information.
All you need to do is google setting and deleting and reading cookies, how to run a function on web page close and your timer / stop watch.
... and please remember to wrap code with forum BBCode tags:-
[CODE]...[/CODE] [HTML]...[/HTML] [PHP]...[/PHP]
If you can't think outside the box, you will be trapped forever with no escape...
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)