
114
User Interfaces for Extensions
Editable select lists
Extension UIs often contain pop-up lists that are defined using the
select
tag. In
Dreamweaver, you can make pop-up lists in extensions editable by adding
editable=
"
true
"
to the
select
tag. To set a default value, set the
editText
attribute and the value that you
want the select list to display.
The following example shows the settings for an editable select list:
<select name="travelOptions" style="width:250px" editable="true"
editText="other (please specify)">
<option value="plane">plane</option>
<option value="car">car</option>
<option value="bus">bus</option>
</select>
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
“Objects, properties, and methods of the Dreamweaver DOM” on page 129
). 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, the value of the
editText
attribute, or an empty string if no text has been
entered and no value has been specified for
editText
.
Dreamweaver adds the following custom attributes for the
select
tag to control editable
pop-up lists:
Attribute
name
Description
Accepted Values
editable
Declares that the pop-up list has an editable
text area
A Boolean value of
true
or
false
editText
Holds or sets text within the editable text area A string of any value
NOT
E
Editable select lists are available in Dreamweaver.
Summary of Contents for DREAMWEAVER 8-EXTENDING DREAMWEAVER
Page 1: ...Extending Dreamweaver...
Page 8: ...8 Contents...
Page 14: ...14 Introduction...
Page 16: ......
Page 54: ...54 Customizing Dreamweaver...
Page 96: ...96 Customizing Code View...
Page 98: ......
Page 110: ...110 Extending Dreamweaver...
Page 138: ......
Page 166: ...166 Insert Bar Objects...
Page 180: ...180 Commands...
Page 248: ...248 Toolbars...
Page 260: ...260 Reports...
Page 278: ...278 Tag Libraries and Editors...
Page 288: ...288 Property Inspectors...
Page 378: ...378 Server Behaviors...
Page 398: ...398 Data Sources...
Page 432: ...432 Server Models...
Page 456: ...456 Data Translators...
Page 482: ......
Page 492: ...492 The Shared Folder...