includes/clientside/static/faders.js
changeset 320 112debff64bd
parent 151 824821224153
child 326 ab66d6d1f1f4
--- a/includes/clientside/static/faders.js	Wed Dec 12 21:46:28 2007 -0500
+++ b/includes/clientside/static/faders.js	Sat Dec 15 18:10:14 2007 -0500
@@ -74,6 +74,8 @@
  *   onclick - an array of functions to be called on button click events
  *             NOTE: key names are to be strings, and they must be the value of the input, CaSe-SeNsItIvE
  *   onbeforeclick - same as onclick but called before the messagebox div is destroyed
+ * Methods:
+ *   destroy: kills the running message box
  * Example:
  *   var my_message = new messagebox(MB_OK|MB_ICONSTOP, 'Error logging in', 'The username and/or password is incorrect. Please check the username and retype your password');
  *   my_message.onclick['OK'] = function() {
@@ -267,6 +269,14 @@
     {
       this.text_area.innerHTML = text;
     };
+    
+  this.destroy = function()
+    {
+      var mbdiv = document.getElementById('messageBox');
+      mbdiv.parentNode.removeChild(mbdiv.nextSibling);
+      mbdiv.parentNode.removeChild(mbdiv);
+      enlighten(true);
+    };
   
   //domObjChangeOpac(0, mydiv);
   //domObjChangeOpac(0, master_div);