Adobe 38040334 - Dreamweaver CS3 User Manual page 296

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

Advertisement

To create the JavaScript file:
1
Create a new blank file.
Enter the following:
2
//************** GLOBALS VARS *****************
_
var MyDatasource
FILENAME = "REQ
_
var DATASOURCELEAF
FILENAME = "DSL
//****************** API **********************
function addDynamicSource()
{
MM.retVal = "";
MM.MyDatasourceContents = "";
dw.popupCommand("MyDatasource
if (MM.retVal == "OK")
{
var theResponse = MM.MyDatasourceContents;
if (theResponse.length)
{
var siteURL = dw.getSiteRoot();
if (siteURL.length)
{
dwscripts.addListValueToNote(siteURL, "MyDatasource", theResponse);
}
else
{
alert(MM.MSG
}
}
else
{
_
alert(MM.MSG
}
}
}
function findDynamicSources()
{
var retList = new Array();
var siteURL = dw.getSiteRoot()
if (siteURL.length)
{
var bindingsArray = dwscripts.getListValuesFromNote(siteURL, "MyDatasource");
if (bindingsArray.length > 0)
{
// Here you create an instance of the DataSource class as defined in the
// DataSourceClass.js file to store the return values.
retList.push(new DataSource("MyDatasource",
_
D.gif";
_
D.gif";
_
Variable");
_
DefineSite);
DefineMyDatasource);
MyDatasource
false,
"MyDatasource.htm"))
_
FILENAME,
DREAMWEAVER CS3
290
Extending Dreamweaver

Advertisement

Table of Contents
loading

This manual is also suitable for:

Dreamweaver cs3

Table of Contents