home *** CD-ROM | disk | FTP | other *** search
/ Flash MX Savvy / FlashMX Savvy.iso / pc / WIN / UltraDev / UltraDev_Trial.exe / Disk1 / data1.cab / Configuration_En / Commands / InsertEnt.js < prev    next >
Encoding:
JavaScript  |  2000-12-11  |  1.6 KB  |  61 lines

  1. // Copyright 1999 Macromedia, Inc. All rights reserved.
  2.  
  3. //---------------   GLOBAL VARIABLES   ---------------
  4.  
  5. var helpDoc = MM.HELP_objInsertEntity;
  6.  
  7. //---------------     API FUNCTIONS    ---------------
  8.  
  9. function isDOMRequired() { 
  10.     // Return false, indicating that this object is available in code view.
  11.     return false;
  12. }
  13.  
  14. function commandButtons(){
  15.   return new Array(BTN_OK,    'insertChars()',
  16.                    BTN_Cancel,'cleanupUI()',
  17.                    BTN_Help,  'displayHelp()');
  18. }
  19.  
  20. function canAcceptCommand() {
  21.   return true;
  22. }
  23.  
  24.  
  25. //---------------    LOCAL FUNCTIONS   ---------------
  26.  
  27. // function: initUI
  28. // description: initialize UI and other associated preferences
  29. function initUI() {  
  30. }
  31.  
  32. // function: cleanupUI
  33. // description: 
  34. function cleanupUI() {
  35.   // Exit
  36.   document.entityForm.Insert.childNodes[1].value = '';
  37.   window.close();
  38. }
  39.  
  40. // function: insertChars
  41. // description: Insert selected character and cleanupUI
  42. function insertChars(curChar) {
  43. // As an Object this command uses the return value in Object tag to insert characters.
  44.   window.close();
  45. }
  46.  
  47. // function: objectTag
  48. // description: Return inserted value for an Object
  49. function objectTag() {
  50.   // Return the html tag that should be inserted
  51.   return document.entityForm.Insert.childNodes[1].value;
  52. }
  53.  
  54. //--- Interface Support Functions
  55.  
  56. // Handles selection and display of choosen character in the form field.
  57. function setChar(curChar) {
  58.   // Add the character to the insertion field.
  59.   document.entityForm.Insert.childNodes[1].value = '&' + curChar + ';';
  60. }
  61.