home *** CD-ROM | disk | FTP | other *** search
/ Practical Internet Web Designer 86 / PIWD86.iso / pc / contents / dreamweaver / software / dwmx2004.exe / Disk1 / data1.cab / Configuration_En / Commands / RDSUserDialog.js < prev    next >
Encoding:
Text File  |  2003-09-05  |  1.1 KB  |  46 lines

  1.  
  2. <!--Copyright 2000, 2001, 2002, 2003 Macromedia, Inc. All rights reserved.-->
  3.  
  4. //***********************GLOBAL VARS********************
  5. var helpDoc = MM.HELP_cmdcfDataSourceLogin;
  6.  
  7. //*************************API**************************
  8.  
  9. function commandButtons(){
  10.   return new Array(MM.BTN_OK, "okClicked()",
  11.                    MM.BTN_Cancel,"cancelClicked()",
  12.                    MM.BTN_Help,"isplayHelp()" );
  13. }
  14.  
  15.  
  16.  
  17. //*******************LOCAL FUNCTIONS*********************
  18.  
  19. function initializeUI(){
  20.    var data = MM.commandArgument;
  21.    document.theForm.username.value = data.username;
  22.    document.theForm.password.value = data.password;
  23. }
  24.  
  25. function cancelClicked(){
  26.    MM.commandReturnValue = "";
  27.    window.close();
  28. }
  29.  
  30. function okClicked(){
  31.   var dataObj = new Object();
  32.   dataObj.username = document.theForm.username.value;
  33.   
  34.   if(dataObj.username)
  35.   {
  36.     if(StripChars(" ", document.theForm.username.value) == "")
  37.     {
  38.         alert(MM.MSG_EnterPassword);
  39.         return;
  40.     }
  41.   }
  42.   dataObj.password = document.theForm.password.value;
  43.  
  44.   MM.commandReturnValue = dataObj;
  45.   window.close();
  46. }