title: Open and close pop-up window using Javascript
body: <p>Based on my previous question ( <a href="https://stackoverflow.com/questions/31447508/closing-php-html-window-using-javascript-jquery">https://stackoverflow.com/questions/31447508/closing-php-html-window-using-javascript-jquery</a> ), I have figured-out something.</p>
  <p>Here below is my code. This code opens my url in a small pop-up. I want to close the opened pop-up window using Javascript.</p>
  <pre><code>&lt;html&gt;
  &lt;head&gt;
  &lt;meta http-equiv=&quot;Content-Type&quot; content=&quot;text/html; charset=iso-8859-1&quot; /&gt;
  &lt;title&gt;Auto Play - Video&lt;/title&gt;
  &lt;script language=&quot;javascript&quot; type=&quot;text/javascript&quot;&gt; 
  function myPopup() {
  window.open( &quot;https://mywebsite/test.php&quot;, &quot;myWindow&quot;,&quot;status = 1, height = 30, width = 30, resizable = 0&quot; )
  setTimeout(window.close, 10);
  }
  &lt;/script&gt;
  &lt;/head&gt;
  &lt;body onload=&quot;myPopup()&quot;&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  <p>How can I do that? In other words, I need to close the popup window after 10 seconds. Any help will be more helpful.</p>