thanks to all, this is what finally worked, I needed to make sure it was EST
<SCRIPT>function tick() {
var hours, minutes, seconds, ap;
var intHours, intMinutes, intSeconds;
var today;
today = new Date();
timezoneoffset = today.getTimezoneOffset();
today.setTime(today.getTime() + timezoneoffset*60*1000);
today.setTime(today.getTime() + -5*60*60*1000);
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
<CFIF IsDefined("Attributes.ShowSeconds") AND Attributes.ShowSeconds eq
"Yes">+seconds</CFIF>
<CFIF IsDefined("Attributes.ShowAMPM") AND Attributes.ShowAMPM eq
"Yes">+ap</CFIF>;
Clock.innerHTML = timeString;
<CFOUTPUT>
window.setTimeout("tick();", #Attributes.Ticks#);
}
</CFOUTPUT>
window.onload = tick;
</SCRIPT>
<div id="Clock" title="Clock"></div>
----- Original Message -----
From: "Jon Hall" <[EMAIL PROTECTED]>
To: "CF-Talk" <[EMAIL PROTECTED]>
Sent: Thursday, January 25, 2001 12:12 PM
Subject: Re: Continuous Clock
> The only way to actually show the seconds ticking is with javascript and a
> form field, or a java applet. You could use cascading style sheets to
change
> the look of the form field to look more like a clock then... Check out the
> irt.org page that someone reccommended earlier. They have a very nice
> tutorial on time, and clocks with javascript.
>
> jon
> ----- Original Message -----
> From: "Cami Lawson" <[EMAIL PROTECTED]>
> To: "CF-Talk" <[EMAIL PROTECTED]>
> Sent: Thursday, January 25, 2001 11:49 AM
> 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