I want to submit or mail the fully filled or partially filled form data when the user closes the page or hit the back button of the browser. Is it possible to create such an environment using jQuery or JavaScript? I am not aware of onunload event or beforeunload events and I couldn't find any working examples.
Asked
Active
Viewed 58 times
0
-
1http://stackoverflow.com/questions/14929832/send-ajax-to-server-beforeunload – Jordan Soltman Nov 11 '16 at 21:52
-
You could submit the partially completed page to the server, using AJAX, either for every keystroke. – halfer Nov 11 '16 at 21:52
-
Thanks @halfer Let me check that. – Jomon Joseph Nov 11 '16 at 21:59
-
Possible duplicate of [auto save/submit form on page/browser close/exit](http://stackoverflow.com/questions/6981590/auto-save-submit-form-on-page-browser-close-exit) – Shekhu Nov 12 '16 at 11:56