Solved

millisecond countdown timer

Posted on 2012-04-11
3
1,673 Views
Last Modified: 2012-04-25
I'm trying to create a timer that counts down in years, months, days, hours, minutes, seconds and milliseconds. I've found a few guides online, but they are sort of not easy to understand, or do not do the milliseconds. Can anyone help me do something like this, say, for this friday at 13:30.

so it could read 0y 0m 2d 2h 11m 50ms

and counts down the milliseconds. I would show code to demonstrate that I have actually tried to do this myself, but it all failed so dismally that i'd be embarrassed to.

Thanks for any help!
0
Comment
Question by:hibbsusan
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 20

Expert Comment

by:BuggyCoder
ID: 37834333
download the sample code from here and make the changes to include year, month and milliseconds....

http://www.hashemian.com/tools/javascript-countdown.htm
0
 

Author Comment

by:hibbsusan
ID: 37834496
Right. I couldn't figure out how to make this one display milliseconds -

Thanks!
0
 
LVL 20

Accepted Solution

by:
BuggyCoder earned 500 total points
ID: 37834577
First Download this js file:-
http://scripts.hashemian.com/js/countdown.js

Next modify the DisplayFormat variable as:-
DisplayFormat = "%%D%% Days, %%H%% Hours, %%M%% Minutes, %%S%% Seconds, %%MS%% MilliSeconds.";

Next in coutback method add this line for milliseconds:-
DisplayStr = DisplayStr.replace(/%%MS%%/g, calcage(secs*1000,1,1000));

i hope you will make rest of the changes now...
0

Featured Post

SharePoint Admin?

Enable Your Employees To Focus On The Core With Intuitive Onscreen Guidance That is With You At The Moment of Need.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Get to know the ins and outs of building a web-based ERP system for your enterprise. Development timeline, technology, and costs outlined.
This article discusses how to implement server side field validation and display customized error messages to the client.
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…
The is a quite short video tutorial. In this video, I'm going to show you how to create self-host WordPress blog with free hosting service.

726 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question