Browser overrides text on warning dialog using jQuery 1.4
<p>I'm working on a requirement to show a warning box if the user is about to leave a page with unsaved changes.  This is the code:</p>

<pre><code>$(function() {
    $(':input',document.myForm).change(function() { 
        window.onbeforeunload = function() {
            return "Are you sure you want to leave this page? You have unsaved changes!";
        }
    });

    $('form').submit(function() {
        window.onbeforeunload = function() { };
    });
});
</code></pre>

<p>Everything functions fine, however, the text and the popup box get overridden by the browser.  I've tried IE and Firefox, but they both seem to override my text and use their built-in warning popup.  Is there a way around this to display a popup with my text and a jQuery dialog that I can configure?</p>
