473,386 Members | 1,810 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

maintain opener property after refresh/reload of popup

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
3 4242
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
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Gordan | last post by:
Hi, I open a popup from my main window and when the popup closes the main has to be restarted; so I did opener.history.go(0) is there another way to refresh the opener? Gordan
1
by: sentinel | last post by:
Hello, I'm having problems refreshing a main window, and am not sure really whether the solution will be Javascript or PHP related. Firstly, I have a main file that calls a pop-up box which...
19
by: Darren | last post by:
I have a page that opens a popup window and within the window, some databse info is submitted and the window closes. It then refreshes the original window using window.opener.location.reload(). ...
3
by: Dan M | last post by:
Is it possible to redirect or refresh the contents of Page1 from within Page2 where Page2 was opened by Page1?
3
by: Steve Wark | last post by:
I have created a ASP.NET application and created two forms within the application (Webform1.aspx & Webform2.aspx). On the first form I have placed a textbox (TextBox1) and a button, which when...
1
by: JJ | last post by:
Hi All, How in ASP.NET, from PopUp window: 1) - save Data in Database; and after 2) a) - Reload the opener window b) -close PopYp window. Note:
4
by: Matt Jensen | last post by:
Howdy all Hopefully I can explain my problem straightforwardly. In it's simplest explanation, what I want to do is have a hyperlink that, when clicked, executes some client side JavaScript and...
4
by: badaczewski | last post by:
The following javascript appears on a popup window. <script language="javascript" type="text/javascript"> function InsertContact(value) { window.opener.CallBackContact(value); window.close();...
4
by: Frank | last post by:
Hello everyone, I have a problem that the window.opener variable is lost once my popup page has a postback. On multiple pages they address this problem but I cannot find a correct answer. ...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.