Block popup windows settings give error to close popup window in javascript
<p>I have one web page, on which when user click on button(for calculation purpose) one popup window open(its an aspx page as popup) .</p>

<p>When user done calculations on popup then automatically popup is close. </p>

<p>But when user block popup windows through browser setting then popup open but cant close.</p>

<p>I want to close this popup window even when user block popup windows.</p>

<p>If you have any solution for this then plz give reply.</p>

<p>Code for open popup window:</p>

<pre><code>window.open('frmSelection.aspx?form=' + formname + '&amp;controlname=' + controlname + '&amp;caption=' + caption + '&amp;control1=' + control1 + '&amp;control2=' + control2 + '&amp;control3=' + control3 + '&amp;Filter=' + filter + '', null,
                                    'height=500,width=562,status=yes,toolbar=no,menubar=no,location=center');
</code></pre>

<p>Code for close popup window:</p>

<pre><code>   protected void dgrdSelection_ItemCommand(object source, DataGridCommandEventArgs e)
        {
            if (e.CommandName == "Select")
            {
                StringBuilder strScriptBuilder = new StringBuilder();
                strScriptBuilder.Append("&lt;script language='javascript' type=text/javascript&gt; ");

                strScriptBuilder.Append(" window.close(); ");
                strScriptBuilder.Append(" &lt;/script&gt; ");
} 
        }
</code></pre>

<p>Thanks in adv.
Pallavi</p>
