home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 35 Internet / 35-Internet.zip / mozil06.zip / bin / chrome / messenger.jar / content / messenger / addressbook / abAddressBookNameDialog.js next >
Text File  |  2001-02-14  |  715b  |  39 lines

  1. var okCallback = 0;
  2.  
  3. function abNameOnLoad()
  4. {
  5.     doSetOKCancel(abNameOKButton, 0);
  6.  
  7.     // look in arguments[0] for parameters
  8.     if (window.arguments && window.arguments[0])
  9.     {
  10.         if ( window.arguments[0].title )
  11.         {
  12.             dump("title = " + window.arguments[0].title + "\n");
  13.             var title = window.arguments[0].title;
  14.             top.window.title = title;
  15.         }
  16.         
  17.         if ( window.arguments[0].okCallback )
  18.             top.okCallback = window.arguments[0].okCallback;
  19.     }
  20.     
  21.     // focus on input
  22.     var name = document.getElementById('name');
  23.     if ( name )
  24.         name.focus();
  25.     moveToAlertPosition();
  26. }
  27.  
  28. function abNameOKButton()
  29. {
  30.     if ( top.okCallback )
  31.     {
  32.         var name = document.getElementById('name').value;
  33.     
  34.         top.okCallback(name);
  35.     }
  36.     
  37.     return true;
  38. }
  39.