User Guide

Tag editor APIs 215
Example
Suppose the user edits the following tag:
<crfweather zip = “94065”/>
If the editor contains a text field for editing the zip attribute, the function needs to initialize the
form element so that 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: true if the input for HTML form elements is valid; false
if input values are not valid.
Example
When the user creates a table, a negative integer is entered for the number of table rows. The
validateTag() function detects the invalid input, displays an alert message, and returns a
false value.