I want to make a countdown timer to november 19 2006. I looked online and found a tutorial to do it in flash, but I just need some simple javascript. I want to put it on http://wiifantastic.com/index.php in the overview box.
<script language="JavaScript"> function show() { target = new Date("19 November, 2006"); targetEpoch = target.getTime(); today = new Date(); todayEpoch = today.getTime(); sLeft = Math.round((targetEpoch - todayEpoch)/1000); var id = document.getElementById("time"); id.innerHTML = sLeft; setTimeout("show()",1000); } </script> <body onload="show()"> <div id="time" style="border:1px solid blue; padding:4px;"></div> HTML: this gives the seconds left.. you can format it to be days, hours, seconds, ...