title: How to close active tab with Javascript?
body: <p>Is it also possible to close an active tab (html or php file) which is not open by javascript but located on the same folder?</p>
  
  <p>Any advice or codes how to do it?</p>
  
  <pre><code>var activeTab = null; //set activeTab into null
  
  function openWin() {
      activeTab = window.open("/Test.php", "_blank");
  } // i set this function to store the active browser located in the same folder
  
  window.alert('Succesfully Updated') //pop up successfull
  openWin.close(); //close the activeTab first before closing the window
  window.close();
  </code></pre>