Hello,
I want to ask user about leaving page when there is some not saved data on page.
I wrote code
<script>
window.onbeforeunload= function() { return "Save your data plz"; };
</script>
But the problem is when am submitting data,
then am rendering another page.
Due to this confirm message, page is asking me to leave page after submission also.
How can I restrict that?