popup from a popup 
Author Message
 popup from a popup

Hi all...I have a page, which i open using window.open  (Let's call it first
child).
From this page i have a button, which opens another popup..(Let's call it
second child)

on closing of the second child i set a few hidden variables in the first
child
My problem is that when i close the firstchild(using the default cross no
the top), when the second is still open and then try and xlose the second,
it gives me a runtime error saying that the callee is unavailable and all
connections are closed..

Is there any way, by which if the parent is closed,( when the child is still
open), i stop the user from closing it or close the child also
automatically????



Tue, 02 Mar 2004 01:25:20 GMT  
 popup from a popup
var childWindow = window.open();
window.onunload = function()
{
    if(self.childWindow) childWindow.close();

Quote:
}



| Hi all...I have a page, which i open using window.open  (Let's call it
first
| child).
| From this page i have a button, which opens another popup..(Let's call
it
| second child)
|
| on closing of the second child i set a few hidden variables in the
first
| child
| My problem is that when i close the firstchild(using the default cross
no
| the top), when the second is still open and then try and xlose the
second,
| it gives me a runtime error saying that the callee is unavailable and
all
| connections are closed..
|
|
| Is there any way, by which if the parent is closed,( when the child is
still
| open), i stop the user from closing it or close the child also
| automatically????
|
|
|
|
|
|
|
|


Tue, 02 Mar 2004 01:39:42 GMT  
 popup from a popup
You cannot stop window from closing, but it's easy to remove child window
when parent is closed:

onunload=function(){child.close()}

where child is the pointer obtained from window.open() call.

--
Gosha Bine
http://www.stereofrog.com


Quote:
> Hi all...I have a page, which i open using window.open  (Let's call it
first
> child).
> From this page i have a button, which opens another popup..(Let's call it
> second child)

> on closing of the second child i set a few hidden variables in the first
> child
> My problem is that when i close the firstchild(using the default cross no
> the top), when the second is still open and then try and xlose the second,
> it gives me a runtime error saying that the callee is unavailable and all
> connections are closed..

> Is there any way, by which if the parent is closed,( when the child is
still
> open), i stop the user from closing it or close the child also
> automatically????



Tue, 02 Mar 2004 02:00:22 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. reference to popup from popup

2. popup window

3. popup object

4. Stop browser's popup menu

5. VBScript and DHTML Popup

6. Popup menus - responding to events

7. Popup-window (vbs / wsh)

8. Closing a popup created with window.createPopup()

9. popup object not displayed in IE5 with VBScript

10. reloading IFRAME from popup

11. reference diff window from modal popup

12. IE5.5 Popup

 

 
Powered by phpBB® Forum Software