Hello there agian! document.images[i] returns an array of all the images in the document right! Well this this leads to my questions! Does it return all the images in the document including thoughs in frames! Because I cant figure out how to reference frame then ask for images array!!

Skyzyx

06-15-2003, 06:41 PM

parent.document.frames["frameName"].document.images;

Mr J

06-15-2003, 06:44 PM

document.images.length will return the number of images in the document.

This does not include images in other documents loaded into another frame

In order to target another frame you use

parent.main.document.images.length

where main is the name of the frame

So to reference the second image in another frame so would go

parent.main.document.images[1]

scriptkeeper

06-16-2003, 12:31 AM

for some reason that doesn't work it returns a value of 0 but there are 24 images in that frame? And when I call specific image in the array it returns undefined? Could it be because I am using an iframe or am I just scripting challenged!