Hi there, I'm looking for a countdown timer script that can display decreasing minutes, seconds and milliseconds in this format 00:00:00. I have done my research on STM forum and so far there is only a timer that displays seconds and milliseconds only. Also, I know that beggars can't be choosers but I would really appreciate it if I can customize this timer (font size, color and font type).
If anybody has a countdown timer with the above attributes then please contact me
thank you so much!
Milliseconds are tricky: http://stackoverflow.com/questions/2...h-milliseconds
My favourite countdown timer is this one: http://keith-wood.name/countdown.html . No Milliseconds but otherwise very good.
You can try with this, I've created this half sleepy but I hope it will work.
Here is the Javascript:
var seconds = 120;
var hundreds = 0;
function secondPassed() {
var minutes = Math.round((seconds - 30)/60);
var remainingSeconds = seconds % 60;
if (remainingSeconds < 10) {
remainingSeconds = "0" + remainingSeconds;
}
document.getElementById('countdown').innerHTML = minutes + ":" + remainingSeconds + ":" + hundreds;
if (hundreds === 0){
if (seconds === 0) {
clearInterval(countdownTimer);
document.getElementById('countdown').innerHTML = "Buzz Buzz";
}
else {
seconds--;
hundreds = 100;
}
}
else{
hundreds--;
}
}
var countdownTimer = setInterval('secondPassed()', 10);
<span id="countdown" class="timer"></span>
Thanks guy, exactly what I needed 
Here is what I use:
<script type="text/javascript">
// Set how many seconds to count down, milli stays at 1000
var seconds = 30;
var milli = 1000;
var timeoutval;
function Timer() {
timeoutval = setTimeout(Timer, 10);
if (seconds < 0) {
// Stop the timeout function
clearTimeout(timeoutval);
// Do Something like close window or redirect page.
window.location.href = "http://nldvr.voluumtrk.com/click";
}
else {
// if the milli seconds is below zero, de-increment(is that even a word??) the second and reset milliseconds
if (milli < 0) {
seconds--;
milli = 1000;
}
else {
// Display the countdown
DisplayCountdown();
}
// de-increment milli by 10, 10 seemed to work the best
milli = milli - 10;
}
}
function DisplayCountdown() {
// Fill a span tag with the id of timer
var timer = document.getElementById('timer');
// The code below pads the millisecond string so the value doesn't jump around
if (milli < 10) {
timer.innerHTML = seconds + '.00' + milli;
}
else if (milli < 100) {
timer.innerHTML = seconds + '.0' + milli;
}
else {
timer.innerHTML = seconds + '.' + milli;
}
}
Timer();
</script>