<HTML><HEAD>
<!--
-----------
Window Time
-----------
-->
<SCRIPT LANGUAGE="JavaScript"><!-- hide from old browsers
/*
THE JAVASCRIPT COOKBOOK by Erica Sadun, webrx@mindspring.com
Copyright (C)1998 by Charles River Media. All Rights Reserved.
This applet can only be re-used or modifed by license holders of the
JavaScript Cookbook CD-ROM. Credit must be given in the source
code and this copyright notice must be maintained. If you do
not hold a license to the JavaScript Cookbook, you may NOT
duplicate or modify this code for your own use.
Use at your own risk. No warranty is given or implied of the suitability
of this applet for any specific application. Neither Erica Sadun nor
Charles River Media will be held responsible for any unwanted effects
due to the use of this applet or any derivative.
*/
function setClock()
{
var s1 = "<BODY BGCOLOR=\"ffffff\"><FONT SIZE=6 COLOR=\"770000\">"
var s2 ="<CENTER>"
var s3 = "</CENTER></FONT></BODY>"
now = new Date()
parent.JCclock.document.open()
parent.JCclock.document.write(s1+s2+now.toLocaleString()+s3)
parent.JCclock.document.close()
JSCTimeOutID = window.setTimeout('setClock()',1000)
}
<!-- done hiding --></SCRIPT></HEAD>
<BODY bgcolor="ffffff" link="0000ff" vlink="770077"
onload="JSCTimeOutID = window.setTimeout('setClock()',1000);">
<FONT COLOR="007777"><H1><IMG SRC="../GRAFX/UTENS.JPG" WIDTH=80 HEIGHT=50
ALIGN = LEFT>Window Time</H1></FONT>
<BLOCKQUOTE><FONT COLOR="770000">
This script sets the clock window below
to the current time.
</FONT></BLOCKQUOTE>
<BR><BR>
<FONT COLOR="007777"><H2>Discussion</H2></FONT>
<FONT SIZE=4>
This script uses a one-second timeout (one thousand
milliseconds) to update the clock. It updates the
window by recreating an HTML string with the current
date and time when each timeout completes. It sends
this new string to the clock window. The timeout is
then reset for another second.
</FONT>
</BODY>
</HTML>
<h5>Copyright ©1998 by Charles River Media, All Rights Reserved</h5>
</BODY>
</HTML>