How do I close a window after the user clicks on the close button in file upload?
<p>We have a requirement to close the popup window itself when the user clicks on the cancel button in the file upload.</p>

<ol>
<li>main.html</li>
<li>popup.html</li>
</ol>

<p><code>popup.html</code> contains <code>&lt;input type="file"</code>.</p>

<p>Now we have a requirement that when a user clicks on the cancel button in the file upload window <code>popup.html</code> should also be closed.</p>

<pre><code>&lt;!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"&gt; 
&lt;html&gt; 
&lt;head&gt; 
    &lt;script language="javascript"&gt; 
    function openModalDlg() { 
        window.open( "test.html", "", 'width=400,height=100'); 
    } 
    &lt;/script&gt; 
&lt;/head&gt; 
&lt;body&gt; 
    &lt;p&gt; 
        Click 
        &lt;a href="#" onclick="openModalDlg();"&gt;here&lt;/a&gt; 
        to open modal dialog 
    &lt;/p&gt; 
&lt;/body&gt; 
&lt;/html&gt; 
</code></pre>
