closer browser window.close not working
<p>I would like to close the browser window using javascript on button click this is what I tried</p>

<pre><code>&lt;script type="text/javascript"&gt;
    function OpenMyWin() {
        window.open('', '_self');
        window.close();
    }
&lt;/script&gt;

&lt;asp:Button ID="btn" runat="server" Text="Close" OnClientClick="OpenMyWin();"/&gt;
</code></pre>

<p>and also I tried the alternate way</p>

<p><code>btn.Attributes.Add("onclick", "javascript:window.close();");</code> and</p>

<p><code>btn.Attributes.Add("onclick", "javascript:OpenMyWin();");</code></p>

<p>I also tried this</p>

<p><code>&lt;script type="text/javascript"&gt;
        function closeWindow() {
            netscape.security.PrivilegeManager.enablePrivilege("UniversalBrowserWrite");
            alert("This will close the window");
            window.open('', '_self');
            window.close();
        }
    &lt;/script&gt;</code></p>

<p>Still I am unable to close my browser can some one help me I need the close event which should work on all browsers</p>
