The Server Formats Api Functions - Adobe 38040334 - Dreamweaver CS3 User Manual

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

Advertisement

The server formats API functions

The server formats API consists of the following data formatting functions.
applyFormat()
Availability
Dreamweaver UltraDev 1.
Description
This function can edit a user's document by adding a format function declaration to it. When a user selects a format
from the Format text field in the Dynamic Data or the Dynamic Text dialog box or in the Bindings panel, Dream-
weaver makes two changes to the user's document: It adds the appropriate format function before the HTML tag (if
it's not already there), and it changes the dynamic data object to call the appropriate format function.
Dreamweaver adds the function declaration by calling the
file. It changes the dynamic data object by calling the
The
function should use the DOM to add function declarations to the top of the user's document.
applyFormat()
For example, if the user selects Currency - Default, the function adds the
Arguments
format
• The
argument is a JavaScript object that describes the format to apply. The JavaScript object is the node
format
that corresponds to the
of the corresponding
format
Returns
Dreamweaver expects nothing.
applyFormatDefinition()
Availability
Dreamweaver UltraDev 1.
Description
Commits the changes to a format that was created using the Edit Format dialog box.
Users can create, edit, or delete formats with the Edit Format List dialog box. This function is called to commit any
modifications that are made to a format. It can also set other, arbitrarily named properties on the object. Each
property is stored as an attribute of the
Arguments
format
• The
argument corresponds to the JavaScript
format
property of the JavaScript object to be the regular expression for the format. The function can also set other,
arbitrarily named properties of the object. Each property is stored as an attribute of the
tag in the Formats.xml file. The object has a JavaScript property for each attribute
format
tag.
tag in the Formats.xml file.
format
JavaScript function in the data format
applyFormat()
formatDynamicDataRef()
Currency
object. The function must set the
format
DREAMWEAVER CS3
Extending Dreamweaver
function.
function declaration.
expression
tag.
format
303

Advertisement

Table of Contents
loading

This manual is also suitable for:

Dreamweaver cs3

Table of Contents