...

View Full Version : iframe reference



scriptkeeper
06-15-2003, 04:36 AM
how can I reference the images in side a frame? I tried this but just got an error:

parent.mainIndex.images.length

For some reason it does not return a value?

chrismiceli
06-15-2003, 05:27 AM
what does it return, if it returns "NULL" then you are using the wrong notation is mainIndex the name of your frame? try this
test = parent.frames["mainIndex"].images.length;
alert(test);

scriptkeeper
06-15-2003, 05:58 AM
That dosent seem to work either I just need a way to reference the images int the frame so i can apply focus or hilite!! Take a look!!

http://209.210.25.172/temp_007/Default.html

realisis
06-15-2003, 06:30 AM
top.mainIndex.document.images.length = 24

...

btw, your markup also has some typos. Here's an example:

<center><iframe name="mainIndex" src="thumb.html" width="400" height="50"frameborder="0" scrolling="no"></iframe><?center>

Garadon
06-15-2003, 06:31 AM
use document not parent

Garadon
06-15-2003, 04:31 PM
document.mainindex.document.images.length



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum