Click to See Complete Forum and Search --> : Changing an image in another frame?


John Baltz
04-14-2003, 02:46 PM
In one of the recent postings, I saw where users where calling functions from a window opened by the parent page. I have been trying to do much the same thing in a framed environment. I have a web page that I maintain for a local non-profit organization. The page is composed of several pages pulled together as one with five frames. One of the frames contains an image that is blank.

I would like to do a rollover that changes the image in that frame, and chages it back on mouse out. Simple enough when in the same window, but how do I get the image to change when the image is in a different frame that is loaded at the time of entering the web site? Thanks For any Help.

khalidali63
04-14-2003, 03:22 PM
There are multipe ways to get this done

var img = parent.frameName.document.getElementById("imgId")
img.src = "new Image"

The above is one of the ways and will work on Both NS6+ and IE6+ browsers

Cheers

Khalid