Close child windows from postbacked parent window
<p>I need to close child windows which has been loaded by a parent window.<br>
The child windows are opened by using <code>window.open()</code> method.<br>
I need to close this child windows by clicking a logout button or close button which is in parent window.<br>
My code:<br></p>

<pre><code>    var childWin = [];
    //child window open event
    function child_open(url)
    {
        childWin[childWin.length] = window.open(url);
    }

    //a logout button or close button event
    function parent_close() 
    {
        for (i=0; i&lt;childWin.length; i++) 
        {
            if (childWin[i] == null) return false;
            childWin[i].close();
        }
        window.close();
    }
</code></pre>

<p>This code is OK if the parent window don't postback to server.
When a postback occured in parent window,the value of variable(childWin) disappeared and I can't close child windows by this code.<br>
Problem is - <strong>want to close child windows even the parent postbacked.</strong>
Is there a solution for this?<br>
Thanks for all of your interests and replies.</p>
