includes/clientside/static/faders.js
changeset 320 112debff64bd
parent 151 824821224153
child 326 ab66d6d1f1f4
equal deleted inserted replaced
319:8be996c3740d 320:112debff64bd
    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  *     };
   264   mydiv.appendChild(text);
   266   mydiv.appendChild(text);
   265   
   267   
   266   this.updateContent = function(text)
   268   this.updateContent = function(text)
   267     {
   269     {
   268       this.text_area.innerHTML = text;
   270       this.text_area.innerHTML = text;
       
   271     };
       
   272     
       
   273   this.destroy = function()
       
   274     {
       
   275       var mbdiv = document.getElementById('messageBox');
       
   276       mbdiv.parentNode.removeChild(mbdiv.nextSibling);
       
   277       mbdiv.parentNode.removeChild(mbdiv);
       
   278       enlighten(true);
   269     };
   279     };
   270   
   280   
   271   //domObjChangeOpac(0, mydiv);
   281   //domObjChangeOpac(0, mydiv);
   272   //domObjChangeOpac(0, master_div);
   282   //domObjChangeOpac(0, master_div);
   273   
   283