Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

accessing nested layers

Status
Not open for further replies.

UCENwebster

Programmer
Jun 7, 2002
18
US
lets say I have a nested sublayer:

<div id='biglayer'>
<div id='nested_layer'></div>
</div>

and I want to change the properties of the nested layer called 'nested_layer' from a javascript function. How do I reference that layer in IE and NN? I appreciate any help you can offer
 
document.biglayer.nested_layer.whatever you want to access

Rick It's a pleasure to know that I've helped you. If I have,
please click the link below to let me know. :)
 
For all browsers that support getElementById (this includes IE5+, Opera 5+, Mozilla/N6+) it is sufficient to do this:

document.getElementById('nested_layer').[properties to access]

For NN4.x it's a different story, and it should be like this:

document.layers['biglayer'].layers['nested_layer'].[properties to access]

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top