changing image src in a parent from a child - can I?

S

Steve

I have opened a popup using:

popupWin = window.open(x,y,'status=yes,scrollbars=no,resizable=no,width=800,height=600,
left=435, top=268');

I have an OnUnload event in the child that should change an image in
the parent:

I have tried stuff like:

parent.myImage.src='newimage.gif';

and

window.opener.myImage.src='newimage.gif';

This doesn't work....I have tried simple alerts just to verify that
the browser supports OnUnload etc. Any suggestions will be greatly
appreciated.

Thanks in advance,

Steve
 
L

Lasse Reichstein Nielsen

I have opened a popup using: [window.open]

I have an OnUnload event in the child that should change an image in
the parent: ...
window.opener.myImage.src='newimage.gif';

try
opener.document.images.myImage.src='newimage.gif'
That should work in almost any browser.
/L
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,576
Members
45,054
Latest member
LucyCarper

Latest Threads

Top