home *** CD-ROM | disk | FTP | other *** search
/ Chip 2002 January / 01_02.iso / software / netscape62win / mail.xpi / bin / chrome / messenger.jar / content / messenger / addressbook / abAddressBookNameDialog.js next >
Text File  |  2001-01-25  |  707b  |  38 lines

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