Solved

close a popup when parent form closes

Posted on 2004-09-16
2
304 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 125 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: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

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

Suggested Solutions

Title # Comments Views Activity
Plain Text Editor for iPad 6 96
Beginner to Unreal Engine 4 5 94
ejb wildfly example 2 27
Select specific duplicate row based on specific criteria 4 56
Does the idea of dealing with bits scare or confuse you? Does it seem like a waste of time in an age where we all have terabytes of storage? If so, you're missing out on one of the core tools in every professional programmer's toolbox. Learn how to …
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.

830 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