Adobe Extending Dreamweaver CS4 User Manual
Page 90

84
EXTENDING DREAMWEAVER CS4
User interfaces for extensions
The following example shows the settings for an editable select list:
When you use select lists in your extensions, check for the presence and value of the editable attribute. If no value is
present, the select list returns the default value of
false
, which indicates that the select list is not editable.
As with standard noneditable select lists, editable select lists have a
selectedIndex
property (see “
and methods of the Dreamweaver DOM
” on page 96). This property returns -1 if the text box is selected.
To read the value of an active editable text box into an extension, read the value of the
editText
property. The
editText
property returns the string that the user entered into the editable text box or the value of the
editText
attribute. If no text has been entered and no value has been specified for
editText
, it returns an empty string.
Dreamweaver adds the following custom attributes for the
select
tag to control editable pop-up menus:
Note: Editable select lists are available in Dreamweaver.
The following example creates a Command extension that contains an editable select list using common JavaScript
functions:
Create the example
1
Create a new blank file in a text editor.
2
Enter the following code: