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 / DeleteRepeatEntry.js < prev    next >
Encoding:
JavaScript  |  2003-09-05  |  1.1 KB  |  63 lines

  1. // Copyright 2001, 2002, 2003 Macromedia, Inc. All rights reserved.
  2.  
  3. //---------------   GLOBAL VARIABLES   ---------------
  4.  
  5. var targetDom = null;
  6. var targetRegion = null; 
  7.  
  8.  
  9. //---------------     API FUNCTIONS    ---------------
  10.  
  11.  
  12.  
  13. function isDOMRequired() {
  14.     return true;
  15. }
  16.  
  17. function canAcceptCommand()
  18.     {            
  19.     targetDom = arguments[0]; 
  20.     if (targetDom == null)
  21.         targetDom = dw.getDocumentDOM(); 
  22.  
  23.     if (targetDom == null)
  24.         return false; 
  25.     
  26.     targetRegion = arguments[1]; 
  27.     
  28.     return true; 
  29.     } //canAcceptCommand
  30.  
  31. function receiveArguments()
  32.     {
  33.     targetDom = arguments[0];
  34.     if (targetDom == null)
  35.         targetDom = dw.getDocumentDOM();
  36.     
  37.     targetRegion = arguments[1]; 
  38.     }
  39.  
  40.     
  41. function DoCommand()
  42.     {
  43.     if (!canDeleteRepeatEntry(targetDom, targetRegion))
  44.     {
  45.         var msg = dw.loadString("template editing/delete warning");
  46.         alert(msg);
  47.         dw.beep();
  48.     }
  49.     else if (!doDeleteRepeatEntry(targetDom, targetRegion))
  50.     {
  51.         dw.beep();
  52.     }
  53.     
  54.     targetDom = null; 
  55.     targetRegion = null;
  56.     }
  57.     
  58.     
  59. //---------------    LOCAL FUNCTIONS   ---------------
  60.  
  61.  
  62.  
  63.