Adobe 38040334 - Dreamweaver CS3 User Manual page 214

Extending dreamweaver
Hide thumbs Also See for 38040334 - Dreamweaver CS3:
Table of Contents

Advertisement

If the editor contains a text field for editing the
the user sees the actual ZIP code in the text field, rather than an empty field.
The following code performs the initialization:
function inspectTag(tag)
{
document.forms[0].zip.value = tag.zip
}
validateTag()
Availability
Dreamweaver MX.
Description
When a user clicks on a node in the tree control or clicks OK, the function performs input validation on the currently
displayed HTML form elements.
Arguments
None.
Returns
Dreamweaver expects a Boolean value:
not valid.
Example
When the user creates a table, a negative integer is entered for the number of table rows. The
function detects the invalid input, displays an alert message, and returns a
applyTag()
Availability
Dreamweaver MX.
Description
When the user clicks OK, Dreamweaver calls the
a
value, Dreamweaver calls this function and passes the
true
is being edited). The function reads the values out of the form elements and writes them into the
Arguments
tag
• The
argument is the DOM node of the tag being edited.
tag
Returns
Dreamweaver expects nothing.
Example
Continuing the
cfweather
order to update the user's document to use the new ZIP code, the
attribute, the function needs to initialize the form element so that
zip
if the input for HTML form elements is valid;
true
validateTag()
example, in the following code, if the user changes the ZIP code from 94065 to 53402, in
value.
false
function. If the
validateTag()
object that represents the current tag (the tag that
dom
object must be updated:
dom
DREAMWEAVER CS3
Extending Dreamweaver
if input values are
false
validateTag()
function returns
object.
dom
208

Advertisement

Table of Contents
loading

This manual is also suitable for:

Dreamweaver cs3

Table of Contents