PDA

View Full Version : Parents and iFrames


mr_ego
10-23-2002, 01:52 AM
What would i write to execute a piece of javascript in a parents frame.

For example i have an iframe and i want that iframe to change the source of an image in a parent document.

what could would i use for this. its pretty urgent.

glenngv
10-23-2002, 02:57 AM
in your iframe page:

<input type="button" value="Change" onclick="window.parent.document.images['imageNameInMainWindow'].src='v.jpg'">