Make a web site - JavaScript Programmer’s Reference In Netscape, this is a

JavaScript Programmer’s Reference In Netscape, this is a means of ordering the layers front to back and works identically to the zIndex property of the MSIE Style object. Warnings: . No longer supported in Netscape 6.0. See also: style.zIndex LayerArray object (Object/Navigator) An array containing a list of layers in the document. JavaScript 1.2 Netscape 4.0 Deprecated Availability: JavaScript syntax: N Object properties: myLayerArray = myDocument.layers length Each item in this array corresponds to a tag in the document. This array also includes layers that are created in Netscape by setting the positionattribute of an HTML

tag 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.ABCor document.layers[”ABC”]. Warnings: . There is a bug in the layer management code in Netscape. If a tag is placed into the document without an ID=”…”or NAME=”…” HTML tag attribute, it will increment the length count for the LayerArray but an object will not be placed into the array. . Now if you try to enumerate through all the layers in the array using the length value, your enumeration loop will cause errors when it tries to access elements beyond the physical length of the array. . To avoid this, you should always add NAME=”…” HTML tag attributes to the tags to ensure the layers are stored in the array. ID=”…” HTML tags are important and helpful when trying to access objects in MSIE and in Netscape 6.0. . No longer supported in Netscape 6.0. See also: Collection object, DIV object, Document.layers[], Layer object, Layer.layers[] 1318

Leave a Reply