MACROMEDIA DREAMWEAVER MX 2004-EXTENDING DREAMWEAVER Manual page 56

Extending dreamweaver
Hide thumbs Also See for DREAMWEAVER MX 2004-EXTENDING DREAMWEAVER:
Table of Contents

Advertisement

As with normal (noneditable) select lists, editable select lists have a
"Objects, properties, and methods of the Dreamweaver DOM" on page
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
property. The
editText
box, the value of the
value has been specified for
Dreamweaver adds the following custom attributes for the
pop-up lists:
Attribute name
editable
editText
Note: Editable select lists are available in Dreamweaver.
The following example creates a command that contains an editable select list using common
JavaScript functions:
<html>
<head>
<title>Editable Dropdown Test</title>
<script language="javascript">
function getAlert()
{
var i=document.myForm.mySelect.selectedIndex;
if (i>=0){
alert ("selectedIndex: " + i);
alert("selected text " + document.myForm.mySelect.options[i].text);
}
else{
var i=document.myForm.mySelect_no.selectedIndex;
if (i>=0){
alert ("selectedIndex: " + i);
alert("selected text " +
}
else
alert("nothing is selected");
}
}
function commandButtons()
{
return new Array("OK", "getAlert()", "Cancel", "window.close()");
}
</script>
</head>
<body>
<div name="test">
<form name="myForm">
<table>
<tr>
<td>Editable DropDown with default text:</td>
56
Chapter 3: User Interfaces for Extensions
property returns the string that the user entered into the editable text
attribute, or an empty string if no text has been entered and no
editText
.
editText
Description
Declares that the pop-up list has an editable
text area
Holds or sets text within the editable text area
document.myForm.mySelect_no.options[i].text);
selectedIndex
68). This property
tag to control editable
select
Accepted Values
A Boolean value of
A string of any value
property (see
editText
or
true
false

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the DREAMWEAVER MX 2004-EXTENDING DREAMWEAVER and is the answer not in the manual?

Questions and answers

Subscribe to Our Youtube Channel

This manual is also suitable for:

Dreamweaver mx 2004

Table of Contents