Public Voice Network
- what is hand made? 77
- Angelina Joile boobs.. 2525
- Kanye video projections i… 1717
- standalone flip through? 44
- the gif animation thread 1842718427
- Scary Cool Tech Thread 312312
- The Powerball 4141
- e-cigarettes 2727
- News of the day... 656656
- Quote someone 11471147
- Edit facebook event date…
- The Useful Thread 360360
- Pic of the Day 7465674656
- WANT of the day 14071407
- Vid of the Day 1503515035
- SNEAKERS 477477
- keynote/final cut questio… 11
- 80's-90's MEMORIE… 12661266
- What are you listening to… 55735573
- Premier League 2012/13 112112
- Romanthony 55
- Smatik Update 2013 22
- The Seasteading Institute 22
- dolphin of the day 66
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


