I have a page with a form to database
When exiting the page, I want it to ask me whether I would like to save or dismiss changes
I have so far the following..how do I apply this so that it submits the form if ok is clicked?
var agree=confirm("Are you sure you want to exit? \n\n Please save changes or cancel them!");
return true ;
return false ;
<BODY onUnload="return confirmSubmit()">
<form name="company" method="POST" action="<%=MM_editAction%>">