Home Articles FAQs XREF Games Software Instant Books BBS About FOLDOC RFCs Feedback Sitemap
irt.Org
#

Q251 How do you access the images in a layer in Netscape?

You are here: irt.org | FAQ | DHTML | Q251 [ previous next ]

You need to access the layers document, i.e. document.layer['layername'].document.images['imagename']

The following illustrates two images, one normal image, and another in a layer:

<img src="imageInDocument.gif" name="myImage" width="100" height="100">

<layer name="myLayer">
<img SRC="imageInLayer.gif" name="myImage" width="100" height="100">
</layer>

<script language="JavaScript"><!--
alert(document.layers['myLayer'].document.images['myImage'].src);
alert(document.images['myImage'].src);
//--></script>

Feedback on 'Q251 How do you access the images in a layer in Netscape?'

©2018 Martin Webb