Try the following code in your HTML

        <span id=tick2>
</span>

 <script>
 <!--

 function show2(){
 var Digital=new Date()
 var hours=Digital.getHours()
 var minutes=Digital.getMinutes()
 var seconds=Digital.getSeconds()
 var dn="AM"
 if (hours>12){
 dn="PM"
 hours=hours-12
 }
 if (hours==0)
 hours=12
 if (minutes<=9)
 minutes="0"+minutes
 if (seconds<=9)
 seconds="0"+seconds
 var ctime="<font face='Tahoma' color='#000000' size='1'><b>Current
time:</b>  "+hours+":"+minutes+":"+seconds+" "+dn+"</font>"
 if (!document.all)
 document.write(ctime)
 else
 tick2.innerHTML=ctime
 }
 function loadclock(){
 if (document.all)
 setInterval("show2()",1000)
 }
 if (!document.all)
 show2()
 //-->
 </script>


Jason

-----Original Message-----
From: Cami Lawson [mailto:[EMAIL PROTECTED]]
Sent: Thursday, January 25, 2001 9:50 AM
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

Reply via email to