The Server Formats Api; Applyformat(); Applyformatdefinition() - MACROMEDIA DREAMWEAVER MX 2004-EXTENDING DREAMWEAVER Manual

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

Advertisement

The Server Formats API

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, Dreamweaver 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
function in the data format file. It changes the dynamic data object by calling the
formatDynamicDataRef()
The
applyFormat()
user's document. For example, if the user selects Currency - Default, the function adds the
function declaration.
Currency
Arguments
format
The
argument is a JavaScript object that describes the format to apply. The JavaScript
format
object is the node that corresponds to the
JavaScript property for each attribute of the corresponding
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
Formats.xml file.
310
Chapter 17: Server Formats
function.
function should use the DOM to add function declarations to the top of the
applyFormat()
tag in the Formats.xml file. The object has a
format
format
JavaScript
tag.
tag in the
format

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?

Subscribe to Our Youtube Channel

This manual is also suitable for:

Dreamweaver mx 2004

Table of Contents