title: pop up window not closing after the parent window is reload
body: <p>In my parent jsp page I've used:</p>
  
  <pre><code>function popUpClosed() {
      window.location.reload();
  }
  </code></pre>
  
  <p>And in child (popup window) I've used:</p>
  
  <pre><code>&lt;script type="text/javascript"&gt;
          window.onunload = function() {
                  if (window.opener &amp;&amp; !window.opener.closed) {
                  window.opener.popUpClosed();
                  }
          };
  &lt;/script&gt;
  </code></pre>
  
  <p>by this code, parent window is reloading after inserting data from popup window but popup window is not closing, I've to manually close the popup window. <strong>How can the popup window be made self close??</strong></p>