473,657 Members | 2,624 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Reference window.opener after redirecting the popup

Hi, I have a simple problem that doesn't seem to have an easy solution. I
have a popup used in many places in the application. At the top of the page,
there is a link to switch between two views of the data. And in both views,
I need a reference to the opener window. The problem is... once I change
view, window.opener loose it's reference. How can I work-around that?

Since that popup is an utility used in many places, I must not have to
modify all the pages using it.

Thanks for your help!
Etienne
Nov 18 '05 #1
5 2218
Etienne Charland wrote:
Hi, I have a simple problem that doesn't seem to have an easy solution. I
have a popup used in many places in the application. At the top of the page,
there is a link to switch between two views of the data. And in both views,
I need a reference to the opener window. The problem is... once I change
view, window.opener loose it's reference. How can I work-around that?

Since that popup is an utility used in many places, I must not have to
modify all the pages using it.

Thanks for your help!
Etienne


Launch it from a 'hidden' frame (frameset of two frames with a width set
to * and 100%).

//Rutger
Nov 18 '05 #2
What will it change?

I'm a bit confused, are you talking about adding a frame (or iframe) to the
popup?

"Rutger Smit" <Do******@gmail .com> wrote in message
news:10******** *****@corp.supe rnews.com...
Etienne Charland wrote:
Hi, I have a simple problem that doesn't seem to have an easy solution. I
have a popup used in many places in the application. At the top of the
page, there is a link to switch between two views of the data. And in
both views, I need a reference to the opener window. The problem is...
once I change view, window.opener loose it's reference. How can I
work-around that?

Since that popup is an utility used in many places, I must not have to
modify all the pages using it.

Thanks for your help!
Etienne


Launch it from a 'hidden' frame (frameset of two frames with a width set
to * and 100%).

//Rutger

Nov 18 '05 #3
Etienne Charland wrote:
What will it change?

I'm a bit confused, are you talking about adding a frame (or iframe) to the
popup?

"Rutger Smit" <Do******@gmail .com> wrote in message
news:10******** *****@corp.supe rnews.com...
Etienne Charland wrote:

Launch it from a 'hidden' frame (frameset of two frames with a width set
to * and 100%).

//Rutger



You have to make a master frameset with a 100% height frame where all
your stuff wil happen (like the window with the pages right now).

The popup opens from the other frame. Now you can communicate from the
100% frame to the hidden frame and from the hidden frame you can
communicate with the popup.
Maybe you can even access the popup straight away with
parent.window["HiddenFrameNam e"].WindowOpener

WindowOpener is defined in the hidden frame JavaScript like
WindowOpener=wi ndow.open("MyPo pup.aspx","bla" ,"width=200, height="200");

I do not guarantee that you the above code is the working way, it meant
to be a idea which direction to search for a solution.

//Rutger
Nov 18 '05 #4
Oh. There's a detail I haven't explained clearly. It is the popup who switch
to another page, not the parent window. And it is the popup who needs to
access the parent.

"Rutger Smit" <Do******@gmail .com> wrote in message
news:10******** *****@corp.supe rnews.com...
Etienne Charland wrote:
What will it change?

I'm a bit confused, are you talking about adding a frame (or iframe) to
the popup?

"Rutger Smit" <Do******@gmail .com> wrote in message
news:10******** *****@corp.supe rnews.com...
Etienne Charland wrote:

Launch it from a 'hidden' frame (frameset of two frames with a width set
to * and 100%).

//Rutger



You have to make a master frameset with a 100% height frame where all your
stuff wil happen (like the window with the pages right now).

The popup opens from the other frame. Now you can communicate from the
100% frame to the hidden frame and from the hidden frame you can
communicate with the popup.
Maybe you can even access the popup straight away with
parent.window["HiddenFrameNam e"].WindowOpener

WindowOpener is defined in the hidden frame JavaScript like
WindowOpener=wi ndow.open("MyPo pup.aspx","bla" ,"width=200, height="200");

I do not guarantee that you the above code is the working way, it meant to
be a idea which direction to search for a solution.

//Rutger

Nov 18 '05 #5
Etienne Charland wrote:
Oh. There's a detail I haven't explained clearly. It is the popup who switch
to another page, not the parent window. And it is the popup who needs to
access the parent.

"Rutger Smit" <Do******@gmail .com> wrote in message
news:10******** *****@corp.supe rnews.com...


Still use the hidden vframe but in this case you can use it as a buffer.
Open the popup whenever you want, do the things with the pop you want,
store the values that you need later on in the hidden frame (using input
fields pr something like that).

Now you can close the popup, navigate in the main frame and when needed,
access the values in the hidden frame with JavaScript.

Question: why not use the Session object?

//Rutger
Nov 18 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
23654
by: Daniel Andersen | last post by:
Hi, Does anyone here know of a way of tracking the window that launched a popup window besides using window.opener? The problem i'm having is that the popup window submits a form within itself before wanting to return the data to the launching page, and unfortunately in IE5 window.opener is undefined after the form is submitted, so i need some sort of workaround to make the page work in IE5. Thanks,
2
7725
by: Brian Vallelunga | last post by:
I'm working on an asp.net site and am trying to implement a popup help window. I want the window to close when the user advances to the next page in our application. The thing is, I'm doing this on a component basis and I don't have access to the body tag from within my help component, so I can't add the onunload tag. Is there some other way of achieving what I want? Can I add an eventhandler to the body tag through javascript? Thanks, ...
2
1798
by: JPL Verhey | last post by:
(i hope somebody (else) will read and have an idea! Thnx) Hi, With a script in a popup window, I want to check if certain content is present in a page loaded into the frame "main" of the frameset in the opener window. I started with something like this (what happens when the considions are met already works):
19
31043
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,...
5
2854
by: Hemanth | last post by:
Hello there, I'm running a script that opens a popup window (which is basically a form with checkboxes and a submit button). When I click the submit button I want to run a PHP script and target the result to main page (I mean, update the parent page). My popup form looks like this: <form name="form1" action="run.php" method="get" target="???">
1
2069
by: Pattabi | last post by:
Hi!!!!!!! I have aspx page which uses ascx(usercontrol) in it. The ascx in turn contains a textbox and a button. if i click the button, javascript code get executed to open another popup window, in that code i am passing the form name , control name of the text box. After few operations are performed in that popup window, when i try to close the popup window, i am setting the value of the texbox in ascx from the popup window using...
4
1914
by: louise raisbeck | last post by:
I have this scenario (simplified) function addnewdata () { check for partial match already in db for information entered by user if (partialmatch succeeds) { open new window aspx page (using javascript) with a datagrid of these partial match records (by doing a sqlcommand using some query string values taken from opener data entered) *** }
1
3231
by: Kalyani | last post by:
Hi, I have a page with a button.On click of this button a popup window opens.Now if this window is kept open until session timeout then login page opens in the same window. Now I want that the popup window should be closed on session timeout and login page should be opened in its parent window.How can I do that? Please do tell me if any one knows. Thanks in advance,
4
3000
by: Mori | last post by:
I am using masterPage and I need to populate a textbox that is in a content control with data from popup page that is not part of the master page. This code works if no masterpage is involved. here is the javascript produced: <script>window.opener.document.forms.txtEndDate.value = '7/15/2006';self.close()</script> I basically need to populate txtEndDate on the content page. if
0
8330
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
8850
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...
0
8746
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
7355
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...
0
4175
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...
0
4334
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2749
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
2
1975
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1737
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.