Public Voice Network
- Tip of The Day 201201
- Unique Insults 5656
- Shooting of the Day 10531053
- 80's-90's MEMORIE… 12631263
- instagram 651651
- Kanye video projections i… 55
- WTF Belvedere Vodka? 22
- Pic of the Day 7464374643
- documentaries 360360
- Made a memorial page for … 1818
- blog 5768657686
- Belfast & Dublin, Ire… 2121
- Architecture of the Day 435435
- Bitcoin 111111
- DaftPunk 195195
- the gif animation thread 1840818408
- Chick of the day .Gif 4949
- Nature of the day 4545
- Quote someone 11461146
- Official NSFW Thread 250250
- MILF's and curvy chic… 271271
- Amy's Baking Company 9797
- Ann Coulter is retarded 55
- identify artist... 44
Javascript Count Up 1111 Responses
Last post: 1 year ago | Thread started: May 10, 12, 12:22 p.m.
- Stugoo
i guess you could use a simple timer like this
http://stuntsnippets.com/javascr…but reverse the start time and end time and have the time increase to a point.
a quick google returns this
http://css-tricks.com/forums/dis…

- Dog-earMay 10, 12, 12:34 p.m. – Permalink
- dbloc
http://css-tricks.com/forums/dis…
this one restarts on refresh. I need it to work off the time.start at 7:00 and start counting up


- Dog-earMay 10, 12, 1:12 p.m. – Permalink
- Hombre_Lobo
^sounds like php / asp is the best way to go, like spot13, server side will be easier. no idea how to though :/


- Dog-earMay 10, 12, 1:31 p.m. – Permalink
- monNom
you can grab the UTC time on load, subtract from the target time (in UTC), and start from there. The only issue is if the user's clock is incorrect (in which case you could pass UTC time from server as a variable).
Javascript Date object and setInterval (to write out the clock) would make short work of this.


- Dog-earMay 10, 12, 1:55 p.m. – Permalink
- monNom
if you want to rebase your client's clock to the server clock, pass the server time into a javascript variable, subtract from the time returned by a new Date() object, then add (subtract?) that to the time each time you create a new date object..
ie:
var serverTime = 123456;
var clientTime = new Date();
var rebase = clientTime-serverTime;
var WhatTimeIsItReally = new Date() + rebase;

- Dog-earMay 10, 12, 2:18 p.m. – Permalink
- dbloc
actually this was best JS based on users clock
http://praveenlobo.com/techblog/…count up and count down versions


- Dog-earMay 10, 12, 2:40 p.m. – Permalink


