Each item in this array corresponds to a <LAYER> tag in the document. This array also includes layers that are created in Netscape by setting the position attribute of an HTML <DIV> block to absolute.
The layers in this array are ordered according to the order in which they appear in the document. Layers can be accessed associatively if they have been given an ID with the ID="..." or NAME="..." tag attribute. This means you can refer to an element whose ID is set to ABC by its unique name. Either as document.ABC or document layers["ABC"].
Netscape 6.0 completely removes layer support. If you use layers, your pages will break.
Be aware in Netscape 4 that if you are not using some NAME or ID binding to the <LAYER> or <DIV> tags, you may get unexpected results if new layers are added and you are accessing elements of this array using numeric index values.
Unnamed layers will not be added to the array, although the array length will correctly reflect the existence of the layers in its count. The count will be wrong and there will be too few objects in the array when you enumerate them in a loop.
See also: | Document object, ID="...", Layer.layers[], LayerArray object, style.position |
Prev | Home | Next |
Document.lastModified | Up | Document.linkColor |
JavaScript Programmer's Reference, Cliff Wootton Wrox Press (www.wrox.com) Join the Wrox JavaScript forum at p2p.wrox.com Please report problems to support@wrox.com © 2001 Wrox Press. All Rights Reserved. Terms and conditions. |