includes/clientside/static/misc.js
changeset 339 5d62ef764b0d
parent 320 112debff64bd
child 340 993fb077944f
child 440 105457df35e5
--- a/includes/clientside/static/misc.js	Sun Dec 23 17:58:21 2007 -0500
+++ b/includes/clientside/static/misc.js	Thu Dec 27 11:35:00 2007 -0500
@@ -125,7 +125,8 @@
   if(typeof message != 'string') message = 'You may want to save your changes first.';
   var body = document.getElementsByTagName('body');
   body = body[0];
-  body.onbeforeunload='return unescape(\''+escape(message)+'\')';
+  body._unloadmsg = message;
+  body.onbeforeunload = function() { return this._unloadmsg };
 }
 
 function enableUnload()
@@ -133,6 +134,7 @@
   var body = document.getElementsByTagName('body');
   body = body[0];
   body.onbeforeunload = null;
+  body._unloadmsg = null;
 }
 
 /**