User Guide

Server model functions 343
dom.serverModel.getServerSupportsCharset()
Availability
Dreamweaver MX.
Description
Determines whether the server model that is associated with the document supports the named
character set.
Note: In addition to letting you call this function from the JavaScript layer, Dreamweaver calls this
function when the user changes the encoding in the page Properties dialog box. If the server model
does not support the new character encoding, this function returns
false and Dreamweaver pops up
a warning dialog box that asks if the user wants to do the conversion. An example of this situation is
when a user attempts to convert a ColdFusion 4.5 document to UTF-8 because ColdFusion does
not support UTF-8 encoding.
Arguments
metaCharSetString
The metaCharSetString argument is a string value that names a particular character set. This
value is the same as that of the
"charset=" attribute of a meta tag that is associated with a
document. Supported values for a given server model are defined in the HTML definition file
for the server model, which is located in the Configuration/ServerModels folder.
Returns
A Boolean value: true if the server model supports the named character set; false otherwise.
dom.serverModel.getServerVersion()
Availability
UltraDev 1; enhanced in Dreamweaver MX.
Description
Determines the server model that is associated with the document and returns that value. Each
server model has a
getVersionArray() function, as defined in the Server Models API, which
returns a table of name-version pairs.
Note: For Dreamweaver, dom.serverModel.getServerVersion() first reads the serverVersion
property of the object that is returned by a call to
getServerInfo() in the Server Models API. If that
property does not exist,
dom.serverModel.getServerVersion() reads it from the getVersionArray()
function.
Arguments
name
The name argument is a string that represents the name of a server model.
Returns
A string that contains the version of the named server model.
000_DW_API_Print.book Page 343 Wednesday, August 20, 2003 9:14 AM