How can I check if the user is closing the window after filling in one or more forms (parts) of a multipart form, but not all the parts.
I have to send the data collected from all/some parts of multipart form to the external server.
One condition is that, I can send the data to the external server only once for one complete form.
edit: after 2 answersi have edited my question a bit
Look into using window.onbeforunload