View Full Version : Count Up Script

09-07-2005, 12:28 AM
Hi Everyone...

I am currently running a "countdown" script with graphics as the numbers being counted down. I was wondering if someone could tell me how I can make it so that this script counts up following my wedding day. It doesn't have to automatically do it, I can just make an entirely new page with the working script.

This should be easy, right? Can someone please alter my code to make it work?

www.DanAndBrandi.com (http://www.DanAndBrandi.com)


09-07-2005, 03:58 PM
In your existing script where it says:

var difference=(Math.round((Date.parse(futurestring)-Date.parse(todaystring))/(24*60*60*1000))*1)Just multiply by negative 1 to make make future dates be positive numbers:

var difference=(Math.round((Date.parse(futurestring)-Date.parse(todaystring))/(24*60*60*1000))*1)*-1Wait until the big day to do this, you will also need to change the images displayed before and after the numbered images (the 'only' and 'days to go' ones). One other thought, you may want to make an image for:

var current="Today Is The Big Day!!!"Like:
var current='<img src="bigday.gif"/>'

Untested but, should work. I didn't want to reset my system date into the future to fully test it.