layer [myLayer] with style attributes[top,left,width,height,z-index,visibility,etc] and the layercontains a bit of text "myText" (Note that the visibilityattribute is set to hidden)
myText
In Netscape the address to the DIV layer "myLayer" is
document.myLayer
in Explorer it is
document.all.myLayer.style
The W3C way of identifying the address is
document.GetElementById(¡®myLayer¡¯).style
To access the properties such as visibility under "myLayer" youwould use these addresses.
Netscape
document.myLayer.visibility
Explorer
document.all.myLayer.style.visibility
W3C
document.getElementById(¡®myLayer¡¯).style.visibility
To change the visibility of this layer you would assign a valueto your JavaScript address.
Netscape
document.myLayer.visibility = "visible";
Explorer
document.all.myLayer.style.visibility = "visible";
W3C
document.getElementById(¡®myLayer¡¯).style.visibility=¡±visible¡±;
Now the previously hidden layer is now visible. This isessentially how DHTML works, but understand there are hundredsand hundreds of attribute properties for text, images, documentsand windows. Not all these properties are supported in bothbrowser and sometime accessing a property requires a few morehurdles, but if you stick to the common denominator propertiesboth browser use then life it a bit easier. I recommend theexcellent DHTML reference book Dynamic HTML - The DefinitiveGuide by Danny Goodman (O'Riley Books) It lists all of the DHMTLproperties and their cross browser compatibilities.