title: onBeforeUnload custom button messages
body: <p>I have the following beforeunload function which I have stolen from sonewhere else....</p>
  
  <pre><code>$().ready(function() {
      $("#posManagerLoginForm").trigger("submit");
  
      $(window).bind("beforeunload", function(){      
          window.setTimeout(function () {
              window.location = "home.htm";
          }, 0);
          window.onbeforeunload = null; // necessary to prevent infinite loop that kills your browser
          return "Press 'Stay On Page' to go to Reporting Manager home";
      });
  });
  </code></pre>
  
  <p>Regardless of what option I select I get navigated to home.htm. Is there a way that I can make the dialog box an ok button instead of the default "Leave Page" or "Stay on page" options?</p>
  
  <p>Or perhaps someone else could make a suggestion on hot to better handle?</p>
  
  <p>thanks</p>