<html><div style='background-color:'><DIV>
<P>Layers are NetScape positionable objects not undersatndable in IE</P>
<P>document.all is a script call on all document objects IE specific</P>
<P>document.layers is Netscape script, specific&nbsp;for the analog call of objects</P>
<P>the author is using it to disqualify the browsers other than IE &amp; NS<BR><BR></P></DIV>
<DIV></DIV>
<DIV></DIV>&gt;From: "Andrzej Wróblewski" <WROBLEWSKI@POCZTA.WPROST.PL>
<DIV></DIV>&gt;Reply-To: javascript@LaTech.edu 
<DIV></DIV>&gt;To: javascript@LaTech.edu 
<DIV></DIV>&gt;Subject: [Javascript] document.layers 
<DIV></DIV>&gt;Date: Mon, 11 Nov 2002 00:54:28 +0100 
<DIV></DIV>&gt; 
<DIV></DIV>&gt;I'm foud this function and I have some question: 
<DIV></DIV>&gt; 
<DIV></DIV>&gt;function show5(){ 
<DIV></DIV>&gt;// what this means: (!document.layers&amp;&amp;!document.all) 
<DIV></DIV>&gt;if (!document.layers&amp;&amp;!document.all) 
<DIV></DIV>&gt;return 
<DIV></DIV>&gt; var Digital=new Date() 
<DIV></DIV>&gt; var hours=Digital.getHours() 
<DIV></DIV>&gt; var minutes=Digital.getMinutes() 
<DIV></DIV>&gt; var seconds=Digital.getSeconds() 
<DIV></DIV>&gt; var dn="AM" 
<DIV></DIV>&gt; if (hours&gt;12){ 
<DIV></DIV>&gt; dn="PM" 
<DIV></DIV>&gt; hours=hours-12 
<DIV></DIV>&gt; } 
<DIV></DIV>&gt; if (hours==0) 
<DIV></DIV>&gt; hours=12 
<DIV></DIV>&gt; if (minutes&lt;=9) 
<DIV></DIV>&gt; minutes="0"+minutes 
<DIV></DIV>&gt; if (seconds&lt;=9) 
<DIV></DIV>&gt; seconds="0"+seconds 
<DIV></DIV>&gt;myclock="<FONT face=Arial size=2><B><FONT size=1>It's 
<DIV></DIV>
<P>&gt;:</FONT><BR>"+hours+":"+minutes+":"&nbsp; +seconds+" "+dn+"</B></FONT>" </P>
<P><STRONG><FONT face=Arial size=2>(THIS IS THE WAY YOU MERGE VAR OBJECT&nbsp;AND STRINGS INTO ONE SIMPLE TEXT STRING)</FONT></STRONG></P>
<P><STRONG><FONT face=Arial size=2>NOW myclock CONTAINS THE TIME STRING</FONT></STRONG></P>
<DIV></DIV>&gt;// I don't uderstand the syntax: 
<DIV></DIV>&gt;document.layers.liveclock.document.write 
<DIV></DIV>&gt;// Could anyone give another example pls. 
<DIV></DIV>&gt;if (document.layers){ 
<DIV></DIV>&gt;document.layers.liveclock.document.write(myclock) 
<DIV></DIV>&gt;document.layers.liveclock.document.close() 
<DIV></DIV>&gt;} 
<DIV></DIV>&gt;else if (document.all) 
<DIV></DIV>&gt;// and what is this: liveclock.innerHTML=myclock how does it work 
<DIV></DIV>&gt;liveclock.innerHTML=myclock 
<DIV></DIV>&gt;setTimeout("show5()",1000) 
<DIV></DIV>&gt; } 
<DIV></DIV>
<P>&gt; <FONT color=#000066>SO THE liveclock&nbsp;&nbsp;is the&nbsp;ID or the&nbsp;NAME of some ielement in the page f.i. DIV SPAN etc&nbsp;&nbsp; </FONT><FONT color=#000066>innerHTML=myclock, assigns the content of the string my clock to the&nbsp;html content of the element named liveclock somewhere inside the document&nbsp;BODY&nbsp;</FONT></P>
<P><FONT color=#000066>so to display this new content inside of this element you write the folwing in the script: liveclock.innerHTML=myclock </FONT></P>
<P>&nbsp;</P>
<DIV></DIV>&gt;I know that's probably RTFM question but I looking in : 
<DIV></DIV>&gt;http://developer.netscape.com/docs/manuals/communicator/jsguide4/ 
<DIV></DIV>&gt;and I found nothing. 
<DIV></DIV>&gt; 
<DIV></DIV>&gt;thnk U in advance for any comments 
<DIV></DIV>&gt;andrzej 
<DIV></DIV>&gt; 
<DIV></DIV>&gt;_______________________________________________ 
<DIV></DIV>&gt;Javascript mailing list 
<DIV></DIV>&gt;Javascript@LaTech.edu 
<DIV></DIV>&gt;https://lists.LaTech.edu/mailman/listinfo/javascript 
<DIV></DIV></div><br clear=all><hr>Protect your PC - <a href="http://g.msn.com/8HMAEN/2024">Click here</a> for McAfee.com VirusScan Online </html>