beautypg.com

Adobe Extending Dreamweaver CS4 User Manual

Page 302

background image

296

EXTENDING DREAMWEAVER CS4

Data sources

To provide a dialog box for the user, create a set of command files: a command definition file in HTML and a
command implementation file in JavaScript (for more information about command files, see “

How commands work

on page 131).

The command definition file tells Dreamweaver the location of the supporting implementation JavaScript files. The
definition file also tells the form for the dialog box that the user sees. The supporting JavaScript file determines the
buttons for the dialog box and how to assign the user input from the dialog box.

Create the command definition file

1

Create a new blank file.

2

Enter the following:



MyDatasource Variable







Name:



3

Save the file as MyDatasource_Variable.htm in the Configuration/Commands folder.

Note: The file MyDatasource_Variable.js is the implementation file that you create in the next procedure.

Create the supporting JavaScript file

1

Create a new blank file.

2

Enter the following:

This manual is related to the following products: