Using Jquery Ui dialog on browser close?
in Using jQuery UI
•
12 years ago
Hi,
I want to display Jquery UI dialog if someone tries to navigate/close the browser.
I am using the following code
- function showPopup() {
jQuery(document).ready(function() {
jQuery("#divPopup").dialog({
bgiframe: true, height: 356,width: 600,autoOpen: true, modal: true
});
};
return false;
}
<body onbeforeunload="return showPopup();">
The Juery UI dialog is shown but the browser (firefox,IE etc) also initiates a dialog

How can I hide the dialog initiated by the browser?
Thanks
-Ankit
2