Results 1 to 7 of 7

Thread: A special Count down clock script

  1. #1
    Join Date
    Apr 2012
    Posts
    13
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default A special Count down clock script

    Is there any script to count down at a particular date so that when the particular date is reached it restart counting to another date automatically.

  2. #2
    Join Date
    Mar 2006
    Location
    Illinois, USA
    Posts
    12,162
    Thanks
    263
    Thanked 690 Times in 678 Posts

    Default

    I don't know of anything specifically like that, but it would be easy to make. Just set the relevant date for the counter with an if statement, checking each of the dates you have to see if it has passed.

    Or do you need this to happen during a single instance of the page? Count down, then reset, count down again, repeat? That would require adding a function to the end of it to restart it. Or you could just refresh the page when it finishes, if that could do what you want.
    Daniel - Freelance Web Design | <?php?> | <html>| espa˝ol | Deutsch | italiano | portuguŕs | catalÓ | un peu de franšais | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum

  3. #3
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    28,924
    Thanks
    43
    Thanked 3,187 Times in 3,151 Posts
    Blog Entries
    12

    Default

    There's always jQuery Countdown:

    http://keith-wood.name/countdown.html

    It can be configured to do just about anything you want including launching a new countdown once the original one has expired.
    - John
    ________________________

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

  4. #4
    Join Date
    Jan 2011
    Location
    Southeastern CT
    Posts
    593
    Thanks
    43
    Thanked 28 Times in 28 Posts

    Default

    I suspect one of these can be used.
    http://www.javascriptkit.com/script/cutindex1b.shtml

    It sounds like they would have to be altered to use multiple dates.I presume a javascript guru could help with that though.
    Thanks,

    Bud

  5. #5
    Join Date
    Apr 2012
    Posts
    13
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    ok thanks for your replies.

    Here is what i meant.

    I have 2 events scheduled twice a week. One on wednesday and the second on saturday.

    If i have a date say:

    Next event date: Wednesday, May 16 2012 11:00 PM GMT-5

    and on wednesday, the date will automatically switch to:

    Next event date: Saturday, May 19 2012 11:00 PM GMT-5

    and so on.

  6. #6
    Join Date
    Apr 2012
    Location
    Chester, Cheshire
    Posts
    329
    Thanks
    7
    Thanked 35 Times in 35 Posts

    Default

    Wouldn't you want to do this in a Server Side script rather than Client Side? It would be better to do it pre-compile rather than after/as the page has loaded.

    It'd be easy enough in PHP to see if it is currently after 11:00 on Saturday and display the date for next Wednesday; or vice versa. Doing it like this would mean you don't have Javascript checking the time every millisecond to see if it needs to modify the page and slowing the site/browser down.

  7. #7
    Join Date
    Apr 2012
    Posts
    13
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    thanks

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
  •