SitePoint Sponsor

User Tag List

Results 1 to 6 of 6

Thread: Countdown Timer

  1. #1
    SitePoint Enthusiast
    Join Date
    Dec 2007
    Posts
    89
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Countdown Timer

    I wonder if someone knows where i can get a countdown script for 24hours, or how one can be made? with active javascript

    basiclly what i need is, when 24hours of the set time has run, it resets to 0 and begins to count down from 24hours again... like if i put it on 09:00PM it should start counting down from there and reset when it reach 09:00Pm again the next day and start over...

    hope someone can help me.

  2. #2
    Programming Team silver trophybronze trophy
    Mittineague's Avatar
    Join Date
    Jul 2005
    Location
    West Springfield, Massachusetts
    Posts
    17,024
    Mentioned
    187 Post(s)
    Tagged
    2 Thread(s)

    countdown

    There are lots of examples of javascript countdown scripts online. But a 24 hour cycle? If I understand you, someone would need to have the page constanly open for client-side javascript to work. I think you may want something server-side for this. What exactly do you want to do?

  3. #3
    Unobtrusively zen silver trophybronze trophy
    paul_wilkins's Avatar
    Join Date
    Jan 2007
    Location
    Christchurch, New Zealand
    Posts
    14,683
    Mentioned
    99 Post(s)
    Tagged
    4 Thread(s)
    The script could set a cookie for the desired time (as a difference from the current time) and work from that whenever people visit the page.

  4. #4
    SitePoint Enthusiast
    Join Date
    Dec 2007
    Posts
    89
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    ok i will explain it

    Actually what i need is, when 24hours of the set time has run, it resets to 0 and begins to count down from 24hours again...example like if i put it on 09:00PM it should start counting down from there and reset when it reach 09:00Pm again the next day and start over...hope u cleared the doubts.

  5. #5
    SitePoint Enthusiast
    Join Date
    Dec 2007
    Posts
    89
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    I will check for any cookies

    Ok i will check for any cookies.thanks for the support..

  6. #6
    From space with love silver trophy
    SpacePhoenix's Avatar
    Join Date
    May 2007
    Location
    Poole, UK
    Posts
    4,998
    Mentioned
    100 Post(s)
    Tagged
    0 Thread(s)
    If it's to trigger the execution of a section of code at the same time every day, it might be better to use a cron job.


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
  •