Macromedia dreamweaver 8-extending dreamweaver 사용자 설명서

다운로드
페이지 504
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 
). 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.