title: After Closing Print Preview on web page, Javascript function of closing window does not work properly on IE
body: <p>I posted this question at the end of the workday as my brain was melted.Please help me.<br>
  I have a web page, calling a JavaScript Function from an Event Handler.
  The JavaScript Function is used to close window.<br>
  Like this:</p>
  
  <pre><code>&lt;HTML&gt;
  &lt;HEAD&gt;
  &lt;SCRIPT LANGUAGE="JavaScript"&gt;
  function closeWin() {
      window.opener = null;
      window.close();
  }
  &lt;/SCRIPT&gt;
  &lt;/HEAD&gt;
  &lt;BODY&gt;
  &lt;FORM&gt;
      &lt;INPUT TYPE="button" VALUE="Close Me" 
      onClick="closeWin()"&gt;
  &lt;/FORM&gt;
  &lt;/BODY&gt;
  &lt;/HTML&gt;
  </code></pre>
  
  <p><br><strong>This web page is needed to run in Internet Explorer(I use IE7).</strong><br>
  When I clicked "Close Me" button,the window would be closed.<br>
  My Problem is -<br>
  (1)Right-Click on the page and select Print Preview...(Print Preview Page will be shown)<br>
  (2)Close the Print Preview Page by clicking on the CLOSE(x) button <br>
  (3)And Then  click "Close Me" button,the window will not be closed.<br>
  So,I don't know how to solve this problem so that the web page close properly by "Close Me" button after viewing Print Preview??<br>
  <br>
    In step (2) -<br>
   (2)Close the Print Preview Page by the escape key on  keyboard ( Esc )<br>
  (3)And Then click "Close Me" button,the window will be closed properly.<br>
  <br>
  I am a beginner at JavaScript and I don't know much about how this problem occurred.</p>