Adobe 38040334 - Dreamweaver CS3 User Manual page 299

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

Advertisement

<!DOCTYPE HTML SYSTEM "-//Macromedia//DWExtension layout-engine 5.0//dialog">
<html>
<head>
<title>MyDatasource Variable</title>
<script src="MyDatasource
<SCRIPT SRC="../Shared/MM/Scripts/CMN/displayHelp.js"></SCRIPT>
<SCRIPT SRC="../Shared/MM/Scripts/CMN/string.js"></SCRIPT>
<link href="../fields.css" rel="stylesheet" type="text/css">
</head>
<body>
<form>
<div ALIGN="center">
<table border="0" cellpadding="2" cellspacing="4">
<tr>
<td align="right" valign="baseline" nowrap>Name:</td>
<td valign="baseline" nowrap>
<input name="theName" type="text" class="medTField">
</td>
</tr>
</table>
</div>
</form>
</body>
</html>
Save the file as MyDatasource_Variable.htm in the Configuration/Commands folder.
3
Note: The file MyDatasource_Variable.js is the implementation file that you create in the next procedure.
To create the supporting JavaScript file:
1
Create a new blank file.
Enter the following:
2
//******************* API **********************
function commandButtons(){
return new Array(MM.BTN
}
//***************** LOCAL FUNCTIONS******************
function okClicked(){
var nameObj = document.forms[0].theName;
if (nameObj.value) {
if (IsValidVarName(nameObj.value)) {
MM.MyDatasourceContents = nameObj.value;
MM.retVal = "OK";
window.close();
} else {
alert(nameObj.value + " " + MM.MSG
}
} else {
_
alert(MM.MSG
}
}
_
Variable.js"></script>
_
OK,"okClicked()",MM.BTN
NoName);
_
Cancel,"window.close()");
_
InvalidParamName);
DREAMWEAVER CS3
293
Extending Dreamweaver

Advertisement

Table of Contents
loading

This manual is also suitable for:

Dreamweaver cs3

Table of Contents