Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

close a popup when parent form closes

Posted on 2004-09-16
2
Medium Priority
?
311 Views
Last Modified: 2010-04-17
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
Comment
Question by:coletteck8
2 Comments
 
LVL 4

Accepted Solution

by:
Sicos earned 500 total points
ID: 12078848

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
 

Author Comment

by:coletteck8
ID: 12078906
what code do i use to check if the main window is closed? can i use the onUnload method?
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Whether you've completed a degree in computer sciences or you're a self-taught programmer, writing your first lines of code in the real world is always a challenge. Here are some of the most common pitfalls for new programmers.
Whether you’re a college noob or a soon-to-be pro, these tips are sure to help you in your journey to becoming a programming ninja and stand out from the crowd.
In this fourth video of the Xpdf series, we discuss and demonstrate the PDFinfo utility, which retrieves the contents of a PDF's Info Dictionary, as well as some other information, including the page count. We show how to isolate the page count in a…
Progress

877 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question