2

I have an AJAX auto-save input fields on my page which rocks! The problem is that in Safari, when the user leaves the page, he gets a warning

  • "Are you sure you want to leave without submitting the form?"

which obviously I don't want.

How can I get rid of it!?!

enter image description here

So the opposite of such post: Dont ask confirm if user submit the form

Community
  • 1
  • 1
denislexic
  • 10,786
  • 23
  • 84
  • 128

1 Answers1

4

when that message pops up this event is fired: onbeforeunload. just add this to your javascript code to remove this event:

window.onbeforeunload = null;
Volkan Ulukut
  • 4,230
  • 1
  • 20
  • 38