I am saving information in the admin panel via ajax. The problem I'm running in to is the "Are you sure you want to navigate away from this page" popup appear, even though everything has been saved. Is there any way to flag the page as saved?

1 Answer 1


You can try clearing window.onbeforeunload with the following Javascript after your AJAX save:

window.onbeforeunload = null;

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.