User Guide
338 Chapter 16: Dynamic Documents
Server model functions
In Macromedia Dreamweaver, 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 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 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.
dom.serverModel.getAppURLPrefix()
Availability
Dreamweaver MX.
Description
Returns the URL for the site’s root folder on the testing server. This URL is the same as that
specified for the Testing Server on 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 site’s root folder.
Arguments
None.
Returns
A string, which holds the URL to the application server that is used for live data and debugging
purposes.
Example
If the user creates a site and specifies that the testing server is on the local computer and that the
root folder is named
"employeeapp", a call to the dom.serverModel.getAppURLPrefix()
function returns the following string:
http://localhost/employeeapp/
000_DW_API_Print.book Page 338 Wednesday, August 20, 2003 9:14 AM