https://forums.asp.net/t/2113642.aspx?Ask+Confirmation+and+autosave+the+page+details+before+leaving
<script type="text/javascript"> var needToConfirm = true; window.onbeforeunload = confirmExit; function confirmExit() { if (needToConfirm) { $('[id*=btnSaveProjectDrafts]').click(); return 'are you sure you want to leave the page'? } } </script>
No comments:
Post a Comment