JavaScript 'beforeunload' event not working in ie
<p>I need to open a pop-out window, then after close pop-out window (refresh a parent page)</p>

<p>jquery 'beforeunload' event not working in internet explorer 8,9.</p>

<p>my code is:</p>

<pre><code> /*
  * events
  * add tallyman
  */
 $("div.main form div.tallymanlist").click(function() {
     if(gencargo.show_confirm('Add  new tallyman?')) {
         var windowObject = gencargo.windowOpener(600,1400, "Tallyman",$(this).children().attr("url"));
         gencargo.windowParentRefresh(windowObject);
     }
 });
</code></pre>

<p>gencargo object is content (window open):</p>

<pre><code>    /*
     *  open  window 
     */
    windowOpener : function (windowHeight, windowWidth, windowName, windowUri) {
        var centerWidth = (window.screen.width - windowWidth) / 2;
        var centerHeight = (window.screen.height - windowHeight) / 2;

        newWindow = window.open(windowUri, windowName, 'resizable=0,width=' + windowWidth + 
            ',height=' + windowHeight + 
            ',left=' + centerWidth + 
            ',top=' + centerHeight);

        newWindow.focus();
        return newWindow;
    },
</code></pre>

<p>and also window close:</p>

<pre><code>    windowParentRefresh : function(object) {

      $(object).bind('beforeunload', function () {
            object.opener.location.reload();
      });
    }
</code></pre>

<p>Close window event is not working in ie.  Only in FireFox, Chrome, Opera.</p>
