Click here to Skip to main content
15,746,302 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I want to close all child window when parent window close
ckulasekaran 7-Feb-12 7:35am    
Its means to close ur application?
use application.exit

1 solution

<script type="text/javascript">
var windows = [];
function conf() {
var rand_no_c = Math.random();
var con = rand_no_c.toString();
var_win = 'child'+con.substring(2);
windows[var_win] ='child.aspx',var_win,'width=1100,height=700,left=50,top=20,status=0');

function closewindow() {
for(w in windows) {
    if(!windows[w].closed) {

<style type="text/css">
 {margin: 0;padding: 0;}

    <button type="button" onclick="conf();">open child window</button>
    <button type="button" onclick="closewindow();">close all windows</button>

This Will Give You An Idea
Share this answer

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900