How to reload iframe content from a pop-up window?

Hello,
I have a main webpage with an iframe embedded inside:

<IFRAME id="imagesframe" src="images_frame.php" width="100%"></IFRAME>

Now, I want to be able to reload the content of that iframe from a pop-up window. I tried the following JavaScript command inside the pop-up window:

opener.document.getElementById("imagesframe").location.reload();

but when I call that command i get the following JavaScript error:

opener.frames.imagesframe has no properties

Any idea? How to fix that?

Thank you for any advice.

Best,
Fab.

Perhaps this may work?

window.opener.document.getElementById("imagesframe").location.reload();

I found the following solution working fine:

  1. Added a “NAME” attribute to IFRAME tag called “imagesframe”

  2. Entered the following command in the JavaScript code of the popup window:

opener.imagesframe.location.reload();

and it works perfectly!

Thank you for your help though!

Best,
Fab.