title: Javascript return in window.onbeforeunload doesn't work in chrome
body: <p>I am writing a piece of Javascript that stops a timer when it is running (active == 1) and the window is closed, a link is clicked, ...</p>
  
  <p>I decided to use a window.onbeforeunload function that works great on IE and FF but doesn't on Chrome.</p>
  
  <p>When I close the window when having a running timer in Chrome, I do get the warning that I'm leaving the page with "false" displayed above that.</p>
  
  <p>Here is the relevant code:</p>
  
  <pre><code>function SetEndTimeOnClose(lngPersonID,lngToDoID){
  if(active == 1){
      var answer = confirm("Wil je de tijd stoppen?");
      if (answer){        
          try{
              StopStopwatch();
              SetEndTime(lngPersonID,lngToDoID);
          }
          catch(err){
          };
          return true;    
      }
      else{
          return false;
      }
  }
  }
  
  window.onbeforeunload = function(){
      return SetEndTimeOnClose(&lt;%=lngOpenPersonID%&gt;,&lt;%=lngToDoID%&gt;);
  }
  </code></pre>