Hello everyone,
I want to notify user if he modifies some data in the form and leaves the page without saving. So I use onunload event to call ajax file to check if the data in the form elements are different from the one in the database, and make an alert message to notify user. I found that my ajax script have not finished the process but the browser already loaded a new page and the user will never see the alert message.
Are there some ways to stall browser until the ajax script finishes?