How to close window in ie using link and onbeforeunload?
<p>I open a pop-up window using following code in <strong>main.html</strong></p>

<pre><code>function openwindow(url)
{
    window.open(url, "mywindow","location=1,status=1,scrollbars=1,resizable=no,width=650,height=650");
}

&lt;a href="javascript: openwindow('/chats/chat?url=http%3A%2F%2Flocalhost%3A3001')"&gt;Open&lt;/a&gt;
</code></pre>

<p>In My <strong>child.html</strong> i used </p>

<pre><code>function closewindow()
{
    self.close();
}

function closeIt()
{
    return "Your chat will be terminated. Are you sure?"
}

&lt;a href="javascript:void(0)" onclick="closewindow();"&gt;Close Window&lt; /a &gt; &amp;nbsp; &amp;nbsp; 
</code></pre>

<p>When i click on close window it gize me alert message that i given on event onbeforeunload but it not close the window when i click on Ok.Also this happens only in I.E. &amp; working fine in mozilla, netscape, safari. I checked it on IE6 &amp; IE8</p>

<p>Any help is Appreciated.</p>

<p>Regards,</p>

<p>Salil Gaikwad</p>
