javascript - How to prevent Window onbeforeunload event to display message dialog -


window.addeventlistener("beforeunload", function (e) {   saveformdata();    (e || window.event).returnvalue = null;   return null; });  function saveformdata() {  whichprojecttosave=document.getelementbyid("selectprojectid").value;  savejsonf();  console.log('saved'); 

this code using , stop message on attached picture display. or if can point me other approach how code before closing window. ?

how change dialog text


Comments

Popular posts from this blog

ubuntu - PHP script to find files of certain extensions in a directory, returns populated array when run in browser, but empty array when run from terminal -

php - How can i create a user dashboard -

javascript - How to detect toggling of the fullscreen-toolbar in jQuery Mobile? -