Specifications

552
Server model functions
In Macromedia Dreamweaver MX, each document has an associated document type. For
dynamic document types, Dreamweaver also associates a server model (such as ASP-JS,
ColdFusion, or PHP-MySQL).
Server models are used to group functionality that is specific to a given server technology.
Different server behaviors, data sources, and so forth, appear based on the server model that is
associated with the document.
Using the server model functions, you can determine the set of server models that are currently
defined; the name, language, and version of the current server model; and whether the current
server model supports a named character set (such as UTF-8).
Note: Dreamweaver MX reads all the information in the server model HTML file and stores this information when it
first loads the server model. So, when an extension calls functions such as dom.serverModel.getServerName(),
dom.serverModel.getServerLanguage(), and dom.serverModel.getServerVersion(), these functions
return the stored values.
dreamweaver.getServerModels()
Availability
Dreamweaver MX
Description
Gets the names for all the currently defined server models. The set of names is the same as the
ones that appear in the Server Model field in the Site Definition dialog box in the user interface.
Arguments
None.
Returns
An array of strings. Each string element holds the name of a currently defined server model.
dom.serverModel.getAppURLPrefix()
Availability
Dreamweaver MX
Description
Returns the URL for the sites root folder on the testing server. This URL is the same as that
specified for the Testing Server under the Advanced tab in the Site Definition dialog box.
When Dreamweaver communicates with your testing server, it uses HTTP (the same way as a
browser). When doing so, it uses this URL to access your sites root folder.
Arguments
None.
Returns
A string, which holds the URL to the application server that is used for live data and debugging
purposes.