Just be aware that it's not Netscape compatible due to the innerHTML
-----Original Message-----
From: JustinMacCarthy [mailto:[EMAIL PROTECTED]]
Sent: Thursday, January 25, 2001 10:02 AM
To: CF-Talk
Subject: RE: Continuous Clock
or JavaScript as below
<script>
<!--
function tick() {
var hours, minutes, seconds, ap;
var intHours, intMinutes, intSeconds;
var today;
today = new Date();
intHours = today.getHours();
intMinutes = today.getMinutes();
intSeconds = today.getSeconds();
if (intHours == 0) {
hours = "12:";
ap = "Midnight";
} else if (intHours < 12)
hours = intHours+":";
ap = "A.M.";
} else if (intHours == 12) {
hours = "12:";
ap = "Noon";
} else {
intHours = intHours - 12
hours = intHours + ":";
ap = "P.M.";
}
if (intMinutes < 10) {
minutes = "0"+intMinutes+":";
} else {
minutes = intMinutes+":";
}
if (intSeconds < 10) {
seconds = "0"+intSeconds+" ";
} else {
seconds = intSeconds+" ";
}
timeString = hours+minutes+seconds+ap;
Clock.innerHTML = timeString;
window.setTimeout("tick();", 100);
}
window.onload = tick;
-->
</script>
<br>
<div id=ReplaceMe style="font-family: verdana; font-size: 20;">What you type
in below will replace this HTML</div>
Justin
>-----Original Message-----
>From: James Maltby [mailto:[EMAIL PROTECTED]]
>Sent: Thursday, January 25, 2001 5:09 PM
>To: CF-Talk
>Subject: RE: Continuous Clock
>
>
>Java is the only way - and even that is rusty at the best of times - the
>worst I've seen involved http refresh every second!!!!
>
>James
>
>-----Original Message-----
>From: Cami Lawson [mailto:[EMAIL PROTECTED]]
>Sent: 25 January 2001 16:50
>To: CF-Talk
>Subject: Continuous Clock
>
>
>I have a display clock that shows the time the user accessed the page but
>now they want a clock that shows the current time continuously. I have
>figured out countdown timers but is there an easy way to display
>the current
>time continuously?
>
>TIA
>cami
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at
http://www.fusionauthority.com/bkinfo.cfm
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists