Possible Duplicate:
Best way to detect when user leaves a web page
I'm looking for a function that will make sure that a form has been validated before the user will go out of the page.
Actually I added many required for the required fields but there is nothing to make sure that the form will be validated.
Is there a way or something that will verify if a form has been submitted before the user will go out of the page?
Actually I use the onclick='return confirm ("Do you really want to go out of the page ?")'
But there is nothing to verify if the form has been submitted.
Receive all my utmost RespecT.
Kind regards.
SP.