title: How to identify if the child window has been closed in javascript?
body: <p>i have this page which opens up a popup. i want to refresh the parent after popup has been closed.. i used the function i found in stackoverflow</p>
  
  <pre><code>  var win = window.open("popup.html");
  
  function doStuffOnUnload() {
       alert("Unloaded!");
    }
  
  if (typeof win.attachEvent != "undefined") {
      win.attachEvent("onunload", doStuffOnUnload);
  } 
  else if (typeof win.addEventListener != "undefined") {
      win.addEventListener("unload", doStuffOnUnload, false);
  }
  </code></pre>
  
  <p>which didn't do anything after i closed the pop up... what can i do achieve this?
  thanks...</p>