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

python - Operations inside variables -

Generic Map Parameter java -

arrays - What causes a java.lang.ArrayIndexOutOfBoundsException and how do I prevent it? -