Jump to content


Check out our Community Blogs

Register and join over 40,000 other developers!


Recent Status Updates

View All Updates

Photo
- - - - -

countdown clock

countdown clock

  • Please log in to reply
4 replies to this topic

#1 Orjan

Orjan

    CC Mentor

  • Moderator
  • 2918 posts
  • Location:Karlstad, Sweden
  • Programming Language:C, Java, C++, C#, PHP, JavaScript, Pascal
  • Learning:Java, C#

Posted 14 September 2008 - 11:57 AM

Hello everybody again :-)

I'm wondering how to make an countdown clock at the easiest way? suggestions?
  • 0

#2 Guest_Jordan_*

Guest_Jordan_*
  • Guest

Posted 14 September 2008 - 03:57 PM

Here is a quick and easy one: Countdown Timer Javascript
  • 0

#3 banker

banker

    CC Newcomer

  • Just Joined
  • PipPip
  • 18 posts

Posted 20 April 2010 - 01:09 PM

I'm need to make a countdown clock as well. Can this be done using PHP?
  • 0

#4 semprance

semprance

    CC Addict

  • Just Joined
  • PipPipPipPipPip
  • 118 posts

Posted 20 April 2010 - 03:34 PM

Not easily. You're better using javascript
  • 0

#5 DarkLordoftheMonkeys

DarkLordoftheMonkeys

    CC Addict

  • Just Joined
  • PipPipPipPipPip
  • 232 posts

Posted 20 April 2010 - 04:06 PM

You can easily make something that counts up or down using the window.setTimeout() function. window.setTimeout() tells the interpreter to call a function after a certain number of milliseconds.

function countdown(){
    count--;
    document.getElementById('time').innerHTML = count;
    window.setTimeout( "countdown()", 1000 );
}

Something like that.
  • 0
Life's too short to be cool. Be a nerd.





Also tagged with one or more of these keywords: countdown, clock

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download