• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 337
  • Last Modified:

close a popup when parent form closes

how do i close a popup when the parent form is closed. the parent form is a .ascx file and the popup is html.
0
coletteck8
Asked:
coletteck8
1 Solution
 
SicosCommented:

Just store a reference to the window.

Declare a global javascript variable ...

var goWindow;

When you open the window open it like this ... goWindow = window.open(....);

When youre main window is closed use the unload event to close the other window like

goWindow.close();

Greetings,
Sicos
0
 
coletteck8Author Commented:
what code do i use to check if the main window is closed? can i use the onUnload method?
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now