Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Javascript > decouple parent window from children

Reply
Thread Tools

decouple parent window from children

 
 
epaetz
Guest
Posts: n/a
 
      07-19-2006
Is there a way to decouple the linkage between a parent and a child
window?

Does the parent window have any sort of a collection that holds all the
children that it has spawned?

I want to break that connection from the parent side or the child
side, it doesn't matter as long as the communication link is completely
broken. I don't want the parent to be aware of the child and
vice-versa.

I don't want to close the parent or any of the children either.

 
Reply With Quote
 
 
 
 
web.dev
Guest
Posts: n/a
 
      07-19-2006

epaetz wrote:
> Is there a way to decouple the linkage between a parent and a child
> window?


When you open a new window, there is no parent-child relationship
between the browser windows in a sense.

> Does the parent window have any sort of a collection that holds all the
> children that it has spawned?


Not a collection. However, when you open a new window, the
window.open() method will return a reference to the window that you've
opened.

"Child" windows know who opened them through window.opener property.

> I want to break that connection from the parent side or the child
> side, it doesn't matter as long as the communication link is completely
> broken. I don't want the parent to be aware of the child and
> vice-versa.
>
> I don't want to close the parent or any of the children either.


When you close the parent window, none of the "child" windows will
close and vice-versa.

 
Reply With Quote
 
 
 
 
epaetz
Guest
Posts: n/a
 
      07-24-2006
Here's the behavior I'm observing.

I have two web applications. Each one uses a browser session cookie on
the client's browser window.

I created a simple portal page that has a link to each of the two apps.
When you click on either link, it opens the respective app in a popup.

When I open the first app, I can use the app normally. I then open the
second app which also works normally. But when I attempt to use the
first app, it appears to have lost it's session cookie, or as I
suspect, it's session cookie has been replaced with the session cookie
from the 2nd popup.

Why do I suspect this? If I close all the open session, and reopen the
portal and click on the first application, I can copy the URL from the
first application and paste it into the url of the parent and then have
complete access to the first application. It appears that the parent
window also gets session cookie of the popup!

Is this normal behavior for children and parent windows?

Thanks,
E


web.dev wrote:
> epaetz wrote:
> > Is there a way to decouple the linkage between a parent and a child
> > window?

>
> When you open a new window, there is no parent-child relationship
> between the browser windows in a sense.
>
> > Does the parent window have any sort of a collection that holds all the
> > children that it has spawned?

>
> Not a collection. However, when you open a new window, the
> window.open() method will return a reference to the window that you've
> opened.
>
> "Child" windows know who opened them through window.opener property.
>
> > I want to break that connection from the parent side or the child
> > side, it doesn't matter as long as the communication link is completely
> > broken. I don't want the parent to be aware of the child and
> > vice-versa.
> >
> > I don't want to close the parent or any of the children either.

>
> When you close the parent window, none of the "child" windows will
> close and vice-versa.


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
decouple copy of a list Dirk Nachbar Python 9 12-10-2010 06:23 PM
If a class Child inherits from Parent, how to implementChild.some_method if Parent.some_method() returns Parent instance ? metal Python 8 10-30-2009 10:31 AM
Does altering a private member decouple the property's value? Ethan Kennerly Python 8 06-20-2007 12:37 PM
clicking on a thumbnail in a parent window causes parent to reload PWalker Javascript 1 02-24-2005 12:56 PM
Killing 1.4.1 parent jvm doesn't kill children also Joel Lindsey Java 1 09-22-2003 03:08 PM



Advertisments