Specifications
Chapter 18220
getServerInfo()
Availability
Dreamweaver MX
Description
Returns a JavaScript object, which can be accessed from within the JavaScript code. You can
retrieve this object by calling the
dom.serverModel.getServerInfo() JavaScript function.
Furthermore,
serverName, serverLanguage, and serverVersion are special properties, which
you can access through these JavaScript functions:
dom.serverModel.getServerName()
dom.serverModel.getServerLanguage()
dom.serverModel.getServerVersion()
Arguments
None.
Returns
Dreamweaver expects an object that contains the properties of your server model.
Example
var obj = new Object();
obj.serverName = "ASP";
obj.serverLanguage = "JavaScript";
obj.serverVersion = "2.0";
...
return obj;
getServerLanguages()
Availability
Dreamweaver UltraDev 1, deprecated in Dreamweaver MX
Description
Returns the supported scripting languages of a server model. This function returns an array of
strings. Dreamweaver uses these strings to populate the Default Scripting Language list that is
found in the App Server category of the Site Definition dialog box.
Note: The Default Scripting Language list exists only in Dreamweaver 4 and earlier. For Dreamweaver MX, the Site
Definition dialog box does not list supported scripting languages nor does Dreamweaver MX use the
getServerLanguages() function. Dreamweaver MX does not use this function because each server model has
only one server language in Dreamweaver MX.
In versions of Dreamweaver other than MX, a server model can support multiple scripting
languages. For example, the ASP server model supports JavaScript and VBScript.
Note: If you want a file in the ServerFormats folder to apply only to a specific scripting language, add the following
statement so it is the first line in the HTML file:
<!-- SCRIPTING-LANGUAGE=XXX -->
In this example, XXX represents the scripting language. This statement causes the server behavior
to appear in the plus (+) menu of the Server Behaviors panel only when the currently selected
scripting language is
XXX.