Adobe 38040334 - Dreamweaver CS3 User Manual page 298

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

Advertisement

{
retArray[0] = params.sourceName;
retArray[1] = params.bindingName;
}
}
return retArray;
}
function deleteDynamicSource(sourceName, bindingName)
{
var siteURL = dw.getSiteRoot();
if (siteURL.length)
{
//For localized object name
if (sourceName != "MyDatasource")
{
sourceName = "MyDatasource";
}
dwscripts.deleteListValueFromNote(siteURL, sourceName, bindingName);
}
}
Save the file as MyDatasource.js in the Configuration/DataSources/ColdFusion folder.
3
Creating the supporting command files for user input
The
addDynamicSource()
which opens a dialog box for the user to enter a specific variable name. However, you still need to create the dialog
box for MyDatasource Variable.
To provide a dialog box for the user, you must create a new 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 126).
The command definition file tells Dreamweaver the location of the supporting implementation JavaScript files as
well as 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.
To create the command definition file:
Create a new blank file.
1
2
Enter the following:
function contains the command
dw.popupCommand("MyDatasrouce_Variable")
DREAMWEAVER CS3
292
Extending Dreamweaver
,

Advertisement

Table of Contents
loading

This manual is also suitable for:

Dreamweaver cs3

Table of Contents