473,791 Members | 2,899 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 4295
Bruce <ba********@yah oo.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.n lwrote:
Bruce <batman4...@yah oo.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.someFunc Name() to run code in the
parent window. That works fine. If I allow the popup to post back to
itself and then try opener.someFunc Name(), 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.n lwrote:
Bruce <batman4...@yah oo.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
5304
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
2178
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 enables comments to be made about certain images on the page. The pop-up makes a connection to a MySQL database and the existing comments are put into a PHP array and echoed to the screen.
19
31075
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(). The problem is that after the reload, it brings you right to the top of the page. When I click 'refresh" on the original page, it brings me back to the original viewing position. Is there a way to duplicate this in from the popup window. Also,...
3
6339
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
4344
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 clicked opens the second form using the window.open(). On the second form I have a textbox (TextBox1) and a button as well. When the second button is clicked it closes the second window with window.close(). What I need to happen is a refresh to...
1
3641
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
4589
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 then saves every form element value and reloads the page (with the 'save' being much the same as what is achieved by an AutoPostBack="True" attribute on a web/html control). Actually it doesn't matter which order the JavaScript or 'save'...
4
2516
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(); } </script>
4
8206
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. This is my situation: I have a main page which shows invoices. When a user clicks on the invoices they get a popup where they can alter the invoice which uses
0
9515
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10426
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10154
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9993
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9029
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7537
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6776
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5430
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4109
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

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.