0

want to show custom jquery dialog box with Yes , No and Cancel button when user tries to navigate away current page/form or try to close window.

on beforeload event shows default browser dialog confirmation. I dont want to show that dialoge.

Is it possible to prevent the default unload event & show custom dialog ?

winner_joiner
  • 12,173
  • 4
  • 36
  • 61
NeoCoder1
  • 1
  • 1
  • 2
    [How can I override the OnBeforeUnload dialog and replace it with my own?](http://stackoverflow.com/questions/276660/how-can-i-override-the-onbeforeunload-dialog-and-replace-it-with-my-own) – alexP Mar 19 '14 at 08:16

1 Answers1

0

Use the following jquery function instead.

$(window).on('unload', function(){
  //Display Dialog here.
});
Doink
  • 1,158
  • 6
  • 10