Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   General Forum (http://www.chiefdelphi.com/forums/forumdisplay.php?f=16)
-   -   Countdown timer untill ship date??!? (http://www.chiefdelphi.com/forums/showthread.php?t=24469)

charlie_grr 15-02-2004 21:08

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>

Racer26 20-02-2004 11:38

Re: Countdown timer untill ship date??!?
 
i wrote a countdown timer in vb6 a while back, you can set it to count down to any day and time... i can send it to you if you want... email me... whodoyacallit@hotmail.com it sits happily centered at the top edge of your screen, dates farther than a month away arent perfect, but i'm close... you can even have it tell you what you're counting down to (in case you forget) HA!


All times are GMT -5. The time now is 11:45.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi