View Single Post
  #6   Spotlight this post!  
Unread 09-11-2002, 00:41
sanddrag sanddrag is offline
On to my 16th year in FRC
FRC #0696 (Circuit Breakers)
Team Role: Teacher
 
Join Date: Jul 2002
Rookie Year: 2002
Location: Glendale, CA
Posts: 8,510
sanddrag has a reputation beyond reputesanddrag has a reputation beyond reputesanddrag has a reputation beyond reputesanddrag has a reputation beyond reputesanddrag has a reputation beyond reputesanddrag has a reputation beyond reputesanddrag has a reputation beyond reputesanddrag has a reputation beyond reputesanddrag has a reputation beyond reputesanddrag has a reputation beyond reputesanddrag has a reputation beyond repute
Quote:
Originally posted by evulish
And how do you do countdown things in HTML?
DHTML

or there's a simpler JavaScript script that goes something like this:

<SCRIPT LANGUAGE="JAVASCRIPT">

ccDayNow = new Date();
ccDayThen = new Date("January 4, 2003")
msPerDay = 24 * 60 * 60 * 1000 ;
timeLeft = (ccDayThen.getTime() - ccDayNow.getTime());
cc_daysLeft = timeLeft / msPerDay;
daysLeft = Math.floor(cc_daysLeft);
cc_hrsLeft = (cc_daysLeft - daysLeft)*24;
hrsLeft = Math.floor(cc_hrsLeft);
minsLeft = Math.floor((cc_hrsLeft - hrsLeft)*60);
document.write( ""+daysLeft+" days left until the 2003 FIRST Robotics Kickoff");
</SCRIPT>


<edit>But this one does not give you real-time counting. You need to refresh the page it's on. The DHTML one does countdown in real-time but the code is obviously much longer.</edit>
__________________
Teacher/Engineer/Machinist - Team 696 Circuit Breakers, 2011 - Present
Mentor/Engineer/Machinist, Team 968 RAWC, 2007-2010
Technical Mentor, Team 696 Circuit Breakers, 2005-2007
Student Mechanical Leader and Driver, Team 696 Circuit Breakers, 2002-2004

Last edited by sanddrag : 09-11-2002 at 00:43.
Reply With Quote