User Guide
102 The Database Connectivity API
For example, the default ADO connection dialog box for an ASP JavaScript
document on a Windows platform is stored in the ASP_Js/Win folder and is named
Connection_ado_conn_string.htm.
The Configuration/ServerModels folder has HTML files that define each server model.
Inside each HTML file is the
getServerModelFolderName() function, which returns the
name of the folder that is associated with the server model. The following example shows
the function for the ASP JavaScript document type:
function getServerModelFolderName()
{
return "ASP_JS";
}
You can also look at the MMDocumentTypes.xml file, which is located in the
Configuration/DocumentTypes folder, to determine the mapping between server models
and document types.
2. Create a JavaScript file that implements at least the following elements:
You can select any name for this implementation file, but it must have a .js extension (for
example, myConnectionImpl.js). You can store this implementation file on either your
local or a remote computer. You might want to store your implementation file in the
appropriate subfolder within the Configuration/Connections folder.
NOTE
At runtime, Macromedia Dreamweaver dynamically builds the list of connection
types that are available to the user from the collection of dialog boxes that are in the
ASP_Js/Win folder.
Element Description Examples
A set of variables Each variable defines a specific
connection property
Type of connection, data
source name, and so on
A set of buttons Each button appears in the
connection dialog box
Test, Help, and so on (OK
and Cancel are
automatically included)
Connectivity functions Together, these functions define
the Connectivity API
findConnection()
applyConnection()
inspectConnection()
NOTE
The HTML file that you defined in Step 1, “Create the layout for the connection dialog
box.” on page 101 must include this connection type implementation file.
000_DW_API_Print.book Page 102 Wednesday, July 20, 2005 11:58 AM