Public Voice Network
- iPhoto 55
- Outdoorsmanship 4444
- Pic of the Day 7475174751
- International Web Dev
- the gif animation thread 1847118471
- Show your latest Pics 39363936
- Game of the Day 1111
- Chick of the day .Gif 5353
- Designer Drugs 224224
- New BOC 2929
- Vid of the Day 1506915069
- London machete attack 4141
- Trailer Of The Day 798798
- DUBSTEP of the Day 459459
- San Francisco 2626
- Been asked to do a legal … 99
- Flat Design 161161
- blog 5770757707
- 2013 QBN Mugs 9292
- Decriminalize all drugs 1111
- religion 217217
- GIF vs JIF 5454
- good music with fake inst… 55
- News of the day... 659659
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


