The Connection Api - Adobe 38040334 - Dreamweaver CS3 User Manual

Api reference
Hide thumbs Also See for 38040334 - Dreamweaver CS3:
Table of Contents

Advertisement

The Connection API

To create a new type of connection, including the dialog box with which users interact, you must implement the
following three functions:
three functions and include them in the JavaScript implementation file that is associated with your new connection
type (see Step 2 "Create a JavaScript file that implements at least the following elements:" on page 72).
The
applyConnection()
HTML source in "The generated include file" on page 75. The
and extracts its properties. You can implement
the information that returns from
following two JavaScript files:
_
_
connection
ado
conn
_
connection
common.js
When the user opens a site, Dreamweaver goes through each file in the Connections folder, opens it, and passes the
contents to
findConnection()
returns a connection object. Dreamweaver then lists all the connection objects in the Database Explorer
nection()
panel.
When the user opens a connection dialog box and selects to create a new connection or duplicate or edit an existing
connection, Dreamweaver calls the
that
created. This process lets Dreamweaver populate the dialog box with the connection infor-
findConnection()
mation.
When the user clicks OK in a connection dialog box, Dreamweaver calls the
the HTML, which is placed in the connection include file that is located in the Configuration/Connections folder.
The
applyConnection()
the dialog box should not be closed. The include file has the default file extension type for the current server model.
When the user adds to the page a server behavior that uses the connection, such as a recordset or a stored procedure,
Dreamweaver adds a statement to the page that includes the connection include file.
findConnection()
Availability
Dreamweaver UltraDev 4.
Description
Dreamweaver calls this function to detect a connection in the specified HTML source and to parse the connection
parameters. If the contents of this source file match the criteria for a valid connection,
a connection object; otherwise, this function returns a
Argument
htmlSource
The
argument is the HTML source for a connection.
htmlSource
Returns
A connection object that provides values for a particular combination of the properties that are listed in the following
table. The properties for which this function returns a value depend on the document type.
,
findConnection()
inspectConnection()
function returns an HTML source within an include file. You can see examples of the
findConnection()
applyConnection()
is located in Configuration/Connections/ASP_Js folder.
_
string.js
is located in Configuration/Connections/Shared folder.
. If the contents of a file match the criteria for a valid connection,
inspectConnection()
function returns an empty string that indicates there is an error in one of the fields and
, and
applyConnection()
findConnection()
to use the search patterns in XML files to extract
. For an example of such an implementation, see the
function and passes back the same connection object
applyConnection()
value.
null
DREAMWEAVER CS3
. You write these
function takes the HTML source
findCon-
function to build
returns
findConnection()
73
API Reference

Advertisement

Table of Contents
loading

This manual is also suitable for:

Dreamweaver cs3

Table of Contents