469,282 Members | 2,007 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,282 developers. It's quick & easy.

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 2059
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.supernews.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.supernews.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["HiddenFrameName"].WindowOpener

WindowOpener is defined in the hidden frame JavaScript like
WindowOpener=window.open("MyPopup.aspx","bla","wid th=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.supernews.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.supernews.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["HiddenFrameName"].WindowOpener

WindowOpener is defined in the hidden frame JavaScript like
WindowOpener=window.open("MyPopup.aspx","bla","wid th=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.supernews.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 discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by Daniel Andersen | last post: by
2 posts views Thread by Brian Vallelunga | last post: by
19 posts views Thread by Darren | last post: by
5 posts views Thread by Hemanth | last post: by
1 post views Thread by Pattabi | last post: by
1 post views Thread by Kalyani | last post: by
reply views Thread by suresh191 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.