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.
Who is Participating?

Improve company productivity with a Business Account.Sign Up

SicosConnect With a Mentor Commented:

Just store a reference to the window.

Declare a global javascript variable ...

var goWindow;

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

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


coletteck8Author Commented:
what code do i use to check if the main window is closed? can i use the onUnload method?
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.

All Courses

From novice to tech pro — start learning today.