Where can I find a quality (free or cheap) countdown clock?

D

Digger

I am the webmaster for a High School Football Team (www.dvfootball.com). I
am looking for some (free or cheap) HTML code to place a count-down clock on
our website to signify our first game... Can anyone send me or suggest a site
where I can accomplish my goal? Thanks
 
T

Trevor L.

Digger said:
I am the webmaster for a High School Football Team
(www.dvfootball.com). I am looking for some (free or cheap) HTML
code to place a count-down clock on our website to signify our first
game... Can anyone send me or suggest a site where I can accomplish
my goal? Thanks

I can write one for you.

What do you want
Days
Hours
Minutes

So that each hour it changes from
Days 5
Hours 4
Minutes 30
to
Days 5
Hours 3
Minutes 30
and so on

Let me know
 
T

Trevor L.

Trevor said:
I can write one for you.

What do you want

Well, I made an executive decision as to what you wanted (or might want) and here is the script

There is one line you need to alter
var matchDate = new Date("Wed Aug 09 18:00:00 2006")
Type inside the brackets the correct date and time of the match, in the same format
(dayname monthname dayofmonth hours:minutes:seconds year)

matchdate.html
==========
<html>
<head>
<script type ="text/javascript">
var matchDate = new Date("Wed Aug 09 18:00:00 2006")

function getdate(){
var now = new Date()
var toGo = matchDate - now

var seconds = 1000
var minutes = seconds*60
var hours = minutes*60
var days = hours*24

var Days = parseInt(toGo / days)
toGo -= Days * days

var Hours = parseInt(toGo / hours)
toGo -= Hours * hours

var Minutes = parseInt(toGo / minutes)
toGo -= Minutes * minutes

var Seconds = parseInt(toGo / seconds)

function checkTime(i) {
if (i < 10)
i="0" + i
return i
}

document.getElementById("nowdate").innerHTML = now.toLocaleDateString()
document.getElementById("nowtime").innerHTML = checkTime(now.getHours())
+ ':' + checkTime(now.getMinutes())+ ':' + checkTime(now.getSeconds())
document.getElementById("togodate").innerHTML = matchDate.toLocaleDateString()
document.getElementById("togotime").innerHTML = checkTime(matchDate.getHours())
+ ':' + checkTime(matchDate.getMinutes()) + ':' + checkTime(matchDate.getSeconds())
document.getElementById("togodays").innerHTML = Days
document.getElementById("togohours").innerHTML = Hours
document.getElementById("togominutes").innerHTML = Minutes
document.getElementById("togoseconds").innerHTML = Seconds }
</script>
</head>
<body onload="getdate()">

<table style="background-color:aqua">
<tr><td>Current Date</td> <td><span id="nowdate"></span></td></tr>
<tr><td>Current Time</td> <td><span id="nowtime"></span></td></tr>
<tr><td>Match Date</td> <td><span id="togodate"></span></td></tr>
<tr><td>Match Time</td> <td><span id="togotime"></span></td></tr>
<tr><td>Days</td> <td><span id="togodays"></span></tr>
<tr><td>Hours</td> <td><span id="togohours"></span></td></tr>
<tr><td>Minutes</td> <td><span id="togominutes"></span></td></tr>
<tr><td>Seconds</td> <td><span id="togoseconds"></span></td></tr>
</table>

</body>
</html>

Have fun
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top