includes/clientside/static/faders.js
changeset 326 ab66d6d1f1f4
parent 215 94db56b8124f
parent 320 112debff64bd
child 419 b8b4e38825db
equal deleted inserted replaced
314:474f8be55943 326:ab66d6d1f1f4
    72  * @param string text - HTML for the body of the message box
    72  * @param string text - HTML for the body of the message box
    73  * Properties:
    73  * Properties:
    74  *   onclick - an array of functions to be called on button click events
    74  *   onclick - an array of functions to be called on button click events
    75  *             NOTE: key names are to be strings, and they must be the value of the input, CaSe-SeNsItIvE
    75  *             NOTE: key names are to be strings, and they must be the value of the input, CaSe-SeNsItIvE
    76  *   onbeforeclick - same as onclick but called before the messagebox div is destroyed
    76  *   onbeforeclick - same as onclick but called before the messagebox div is destroyed
       
    77  * Methods:
       
    78  *   destroy: kills the running message box
    77  * Example:
    79  * Example:
    78  *   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');
    80  *   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');
    79  *   my_message.onclick['OK'] = function() {
    81  *   my_message.onclick['OK'] = function() {
    80  *       document.getElementById('password').value = '';
    82  *       document.getElementById('password').value = '';
    81  *     };
    83  *     };
   272   mydiv.appendChild(text);
   274   mydiv.appendChild(text);
   273   
   275   
   274   this.updateContent = function(text)
   276   this.updateContent = function(text)
   275     {
   277     {
   276       this.text_area.innerHTML = text;
   278       this.text_area.innerHTML = text;
       
   279     };
       
   280     
       
   281   this.destroy = function()
       
   282     {
       
   283       var mbdiv = document.getElementById('messageBox');
       
   284       mbdiv.parentNode.removeChild(mbdiv.nextSibling);
       
   285       mbdiv.parentNode.removeChild(mbdiv);
       
   286       enlighten(true);
   277     };
   287     };
   278   
   288   
   279   //domObjChangeOpac(0, mydiv);
   289   //domObjChangeOpac(0, mydiv);
   280   //domObjChangeOpac(0, master_div);
   290   //domObjChangeOpac(0, master_div);
   281   
   291