close child window which is not open using window.open
<p>I want to close the child window when user logs out from main window.</p>

<p>I stored URL of the child window from java script to session object using web services. Keep in mind that child window is not opening by <code>window.open</code> method.</p>

<p>In aspx page I have a java script code like this:</p>

<pre><code>function closepage(sessionvar) {
    window.opener.location = sessionvar;
    window.close();
};
</code></pre>

<p>Now on aspx code behind page I used this code when user logs out using main window.</p>

<pre><code>string sessionvar = Session["CloseURl"].ToString();
Page.ClientScript.RegisterStartupScript(GetType(), "sessionvar", "closepage()");
</code></pre>

<p>As usual, it's not working.</p>

<p>I would really appreicate if someone can shed some light on this.</p>

<p>thanks</p>
