By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
434,741 Members | 1,979 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 434,741 IT Pros & Developers. It's quick & easy.

maintain opener property after refresh/reload of popup

P: n/a
I have an application where a main window opens a popup window. Within
the popup, I want to be able to post a form back to the popup all the
while maintaining the opener property.

Of course, once the popup window re-loads itself by posting a form to
itself, all Javascript state information is lost and so opener is
undefined.

Is there any way I can communicate with the original opener of a popup
window once the popup window has been reloaded?

Since opener is an object, it's not like I can simply include opener
in the posted form.

Is there some way I can use the window name of the opener to
communicate with the opener once the popup is refreshed?

I realize I could probably get around this with some clever usage of
Ajax so that the popup window content is refreshed without actually
reloading the page but I'm hoping there is some simpler trick I've
overlooked.
Oct 6 '08 #1
Share this Question
Share on Google+
3 Replies


P: n/a
Bruce <ba********@yahoo.cawrites:
Of course, once the popup window re-loads itself by posting a form to
itself, all Javascript state information is lost and so opener is
undefined.
Are you sure about that?

--
Joost Diepenmaat | blog: http://joost.zeekat.nl/ | work: http://zeekat.nl/
Oct 6 '08 #2

P: n/a
On Oct 6, 10:05*am, Joost Diepenmaat <jo...@zeekat.nlwrote:
Bruce <batman4...@yahoo.cawrites:
Of course, once the popup window re-loads itself by posting a form to
itself, all Javascript state information is lost and so opener is
undefined.

Are you sure about that?

--
Joost Diepenmaat | blog:http://joost.zeekat.nl/| work:http://zeekat.nl/
Well, I create a popup, use opener.someFuncName() to run code in the
parent window. That works fine. If I allow the popup to post back to
itself and then try opener.someFuncName(), opener has no properties.

Should I be able to post a form from a popup back to the popup and
still maintain the opener property?
Oct 6 '08 #3

P: n/a
On Oct 6, 10:05*am, Joost Diepenmaat <jo...@zeekat.nlwrote:
Bruce <batman4...@yahoo.cawrites:

Are you sure about that?
Seems it was something else. When I reduced my code down to the
simplest test, it works. It seems opener does survive a POST
operation. I was passing the name of the main function to be called by
the popup to the popup when the window was created and I failed to
include that function name in the POSTed form. It was the function
name that was not being preserved, not the opener property.

Problem solved.
Oct 6 '08 #4

This discussion thread is closed

Replies have been disabled for this discussion.