[Webinar] Streamline your web hosting managementRegister Today

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 321
  • 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

Featured Post

Get your problem seen by more experts

Be seen. Boost your question’s priority for more expert views and faster solutions

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