Treehouse: Grow your CSS skills. Land your dream job.

Javascript count-up timer [RESOLVED]

  • # April 28, 2009 at 10:00 pm

    So I tried to put together a little timer that counts up minutes and seconds, but I can’t seem to get it to work.


    I’m probably going about this the wrong way, but hopefully, someone can point me in the right direction.


    # April 28, 2009 at 10:07 pm

    Ok, noob mistake. I added onload = "displayTime()" to the opening body tag, and now my output now says "Time 1:1" which tells me there’s another problem besides the fact that it’s not working.

    I need the minutes to only start counting after seconds reach more than 59 seconds. My code now looks like this:


    But my output is still Time 1:1.

    # April 29, 2009 at 12:12 am

    Ok, I got it to work:


    Time 00:00

    # April 29, 2009 at 12:42 am

    Thanks Brian! Sorry we couldn’t have been more helpful but I’m glad you got it working.

    # May 9, 2009 at 12:54 pm

    You can do the whole thing with one function and slightly simpler, just dont try to think to much into it.


    can also add one more section to get MS and change the timeout speed:


    # August 25, 2012 at 2:26 am

    Im trying to find a timer that counts up and reminds you when some one is not active for 21 days. Is there anybody who can help locate one?

Viewing 6 posts - 1 through 6 (of 6 total)

You must be logged in to reply to this topic.