View Single Post
  #16   Spotlight this post!  
Unread 15-02-2004, 21:08
charlie_grr's Avatar
charlie_grr charlie_grr is offline
Master Ninja of the Night
#0973 (Greyhound Revolutionary Robotics)
Team Role: Driver
 
Join Date: Mar 2003
Location: Atascadero
Posts: 67
charlie_grr has a little shameless behaviour in the past
Send a message via AIM to charlie_grr Send a message via MSN to charlie_grr
Re: Countdown timer untill ship date??!?

here's some basic java that we use on our site


<SCRIPT>
//change your event date event here.
var eventdate = new Date("Feb 26, 2004 12:00:00 PST");

function toSt(n)
{s=""
if(n<10) s+="0"
return s+n.toString();
}

function countdown()
{cl=document.clock;
d=new Date();
count=Math.floor((eventdate.getTime()-d.getTime())/1000);
if(count<=0)
{cl.days.value ="----";
cl.hours.value="--";
cl.mins.value="--";
cl.secs.value="--";
return;
}
cl.secs.value=toSt(count%60);
count=Math.floor(count/60);
cl.mins.value=toSt(count%60);
count=Math.floor(count/60);
cl.hours.value=toSt(count%24);
count=Math.floor(count/24);
cl.days.value=count;

setTimeout("countdown()",500);
}
// end script -->
</SCRIPT>
__________________
Reply With Quote