Results 1 to 2 of 2

Thread: Count Up Script

  1. #1
    Join Date
    Oct 2004
    Location
    Long Island
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Arrow Count Up Script

    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


    Thanks,
    Dan

  2. #2
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    In your existing script where it says:
    Code:
    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:
    Code:
    var difference=(Math.round((Date.parse(futurestring)-Date.parse(todaystring))/(24*60*60*1000))*1)*-1
    Wait 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:
    Code:
    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.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •