View Full Version : targeting an onMouseOver outside an iframe

12-08-2005, 10:09 PM
hey please go to this test page (http://www.transoptic.net/NewSite/galleries.html)

Click on "bands"

You'll see in the iframe on the right, thumbnails appear. What I'm trying to have happen is when you onMouseOver the thumbs, the larger photo appears in place of the photo on the left(the little girl in the white dress) which is located outside of the iframe.

The large photo is given the id "Gallery," and even though I have given instructions in the script in the iframe to target "Gallery," the script doesn't seem to look outside the iframe.

How would I accomplish this?

12-08-2005, 10:57 PM
The easiest (if it works, see Notes) way would be to put the script on the parent page, then in the calls on the page(s) in the iframe use this syntax:

<a href="#" onMouseOut="parent.MM_nbGroup('out');" onMouseOver="parent.MM_nbGroup('over','Gallery','galleryimages/band1.jpg','',1);">

Notes: This script is more complex than needed for the function it performs, parts may need to be left behind on the page in the iframe. See:

Image Thumbnail Viewer II (http://dynamicdrive.com/dynamicindex4/thumbnail2.htm)

as an alternative script. This alternative would still need be modified to target the parent page image. Go with what you've got first.

12-08-2005, 11:05 PM
actually, this is a huge help.

I'll come back for any further questions, thank you.