The Shared folder has subfolders that contain files shared by multiple extensions, including functions for browsing a user’s folder system, inserting a tree control, creating editable grids, and other features.

Note:

The JavaScript files in the Shared folder have comments within the code that provide details about the functions they contain.

In addition to looking at the JavaScript files in the Shared folder, you should also search for HTML files in the Configuration folder that include these JavaScript files so that you can investigate how they are used.

Generally, you use the functions and resources in the Common and MM folders or add resources to the Common folder for use in new extensions. You should always look in the Shared/Common/Scripts folder first for utilities and functions. These functions and utilities are the most current and comprise the formal interface to the Shared folder. Use files in other folders at your own risk because they might be out of date.

Specifically, the Shared folder contains the following useful folders.

The Common folder

The Common folder has shared scripts and classes for use in third-party extensions.

File

Description

CodeBehindMgr.js

Contains functions for creating a code-behind document. A code-behind document lets you create distinct pages that separate the code for user interface (UI) logic from the code for a UI design. The methods of JSCodeBehindMgr defined in this file can create new code-behind documents and manage the link to design documents.

ColumnValueNodeClass.js

Contains functions for mapping database columns to values. The methods of ColumnValueNode defined in this file let you get and set various values and properties of a database column. Dreamweaver uses this storage class when applying and inspecting edit operations objects (insert and update record objects) and working with the SQLStatement class.

CompilerClass.js

Contains functions for a base class used by CompilerASPNetCSharp and CompilerASPNVBNet but could be extended to support other compilers.

DataSourceClass.js

Contains functions that define the return structure for findDynamicSources().

DBTreeControlClass.js

Contains functions that build a database tree control. This class is used to create and interact with a database tree control. To create a database tree control, such as the one in the advanced recordset server behaviors, create a special <select> list with type="mmdatabasetree" in your HTML file. Attach a CBTreeControl class to the HTML control by passing the <select> list name to the class constructor. Then use the DBTreeControl functions to manipulate the control.

dotNetUtils.js

Contains functions to facilitate working with object property inspectors, and server behaviors for ASP.NET form controls, which are translated.

dwscripts.js

Look in this main file to find useful functions for all Dreamweaver extensions. It includes functions for working with strings, files, design notes, and so on.

dwscriptsExtData.js

This file is an extension of the dwscripts.js file. This file facilitates working with server behaviors, particularly with server behavior EDML files. Used extensively in Dreamweaver’s implementation of server behaviors.

dwscriptsServer.js

This file is an extension of the dwscripts.js file. It contains functions that are specific to server models. Many of these functions are used when working with server behaviors.

GridControlClass.js

Use this class to create and manipulate an editable grid. You add a special select list in your HTML, and attach this class to it in JavaScript to manipulate the grid.

ImageButtonClass.js

This class makes it easy to control the Pressed/Mouse-over-while-pressed/Mouse-over/Disabled-while-pressed look of a button.

ListControlClass.js

Contains functions that manage a <select> tag, also known as a list control. The methods of the ListControl object in this file get, set, and change the value of the SELECT control.

PageSettingsASPNet.js

Contains functions that set the properties of an ASP.NET document.

RadioGroupClass.js

Contains functions that define and manage a radio button group. The methods of the RadioGroup object in this file set and get values and behavior of a radio button group. You attach this class to radio buttons in your HTML to control their behavior.

SBDatabaseCallClass.js

A subclass of ServerBehavior class. This class includes functionality specific to making database calls, for example, calling a stored procedure, using SQL to return a recordset, and so on. This is an abstract base class, which means that it cannot be created and used on its own. To use it, you must subclass SBDatabaseCall() and implement the placeholder functions. Dreamweaver uses this class to implement its recordset and stored procedures server behaviors.

ServerBehaviorClass.js

Contains functions that communicate information about server behaviors to Dreamweaver. You can subclass this class as part of implementing your own server behaviors.

ServerSettingsASPNet.js

Contains functions that store the properties of a ASP.NET server.

SQLStatementClass.js

Contains functions that let you create and edit SQL statements, such as SELECT, INSERT, UPDATE, and DELETE, and stored procedure statements.

tagDialogsCmn.js

Contains functions that help you develop custom tag dialog boxes. The methods of the tagDialog object defined in this file modify attributes and values for a particular tag.

TagEditClass.js

Contains functions that edit tags without changing the DOM of the current page. The methods of the TagEdit object defined in this file get and set a tag’s value, attributes, and children.

TreeControlClass.js

Contains functions that manage a tree control within Dreamweaver. The methods of the TreeControl object defined in this file get, set, and arrange values in a tree. You attach this class to a special MM:TREECONTROL tag in your HTML to manage the tree control functionality.

XMLPropSheetClass.js

Contains functions that manage the location and values of an XML property sheet.

The MM folder

The MM folder contains the shared scripts, images, and classes used by the extensions that come with Dreamweaver, including the scripts for building a navigation bar, specifying preload calls, and defining the shortcut key definitions.

The Scripts subfolder

The Scripts subfolder contains the following utility functions:

File

Description

CFCutilities.js

Contains utility functions related to Adobe ColdFusion components. Functions parse attributes from within the opening tag of a given node, parse a CFC tree, get the current URL DOM, get the CFC DOM, and more.

event.js

Contains functions to register events, notify parties of events from the menus.xml file, and add event notifiers to the menus.xml file.

FlashObjects.js

Contains functions that update a color picker, check for hexadecimal color, check for an absolute link, add an extension to a filename, generate error messages, set Flash attributes, check a link for Flash object, and so on.

insertFireworksHTML.js

Contains functions to insert Adobe Fireworks CS3 HTML code into Dreamweaver documents. Functions check whether current document is a Fireworks document, insert Fireworks HTML at insertion point, update a Fireworks style block to Dreamweaver, and more. Also contains related utility functions.

jumpMenuUI.js

Contains functions for use with the jump menu object and jump menu behavior. Functions populate menu options, create an option label, add an option, delete an option, and so on.

keyCodes.js

Contains an array of keyboard key codes.

navBar.js

Contains classes and functions for working with a navigation bar and navigation bar elements. Includes functions to add, remove, and manipulate navigation bar elements.

NBInit.js

Contains functions related to navigation bar image behaviors.

pageEncodings.js

Defines various language codes.

preload.js

Contains functions for adding and deleting preload-image calls to the BODY/onLoad MM_preloadImages handler.

RecordsetDialogClass.js

Contains the static class and functions to display the recordset server behaviors UI. Functions determine which interface, simple or advanced, to display. Also, houses functionality shared between the UI implementations and mediates switches between the UIs.

sbUtils.js

Contains shared functions for use within Adobe server behaviors. The dwscripts class in the Configuration/Shared/Common/Scripts folder contains more general purpose utilities.

setText.js

Contains functions to escape an expression string, unescape an expression string, and extract an expression string.

sortTable.js

Contains functions to initialize and sort a table as well as functions to sort an array, set the mouse pointer to a hand icon or pointer, and check the type and version of the browser.

The Scripts folder also contains two subfolders, Class and CMN.

The Class folder

The Class folder contains the following utility functions:

File

Description

classCheckbox.js

Helps manipulate a check box control in your HTML extension.

FileClass.js

Contains a class that represents a file in the file system. The paths are represented by URLs for cross-platform compatibility. Methods include toString(), getName(), getSimpleName(), getExtension(), getPath(), setPath(), isAbsolute(), getAbsolutePath(), getParent(), getAbsoluteParent(), exists(), getAttributes(), canRead(), canWrite(), isFile(), isFolder(), listFolder(), createFolder(), getContents(), setContents(), copyTo(), and remove().

GridClass.js

Contains a class that manages MM:TREECONTROL.

GridControlClass.js

Older version of the GridControlClass in the Common folder. See the GridControlClass.js file in the Shared/Common/Scripts folder.

ImageButtonClass.js

Older version of the ImageButtonClass in the Common folder. See the ImageButtonClass.js file in the Shared/Common/Scripts folder.

ListControlClass.js

Older version of the ListControlClass in the Common folder. See the Shared/Common/Scripts/ListControlClass.js file.

NameValuePairClass.js

Creates and manages a list of name/value pairs. Names can contain any character. Values can be blank, but cannot be set to null, which is the same as deleting them.

PageControlClass.js

Example of a page class to be used with the TabControl class. See TabControlClass.js description.

PreferencesClass.js

Contains an object and methods that contain all the preference information for a command.

RadioGroupClass.js

Older version of the RadioGroupClass in the Common folder. See the RadioGroupClass.js file in the Shared/Common/Scripts folder.

TabControlClass.js

Helps build an extension that has multiple tab views, page.lastUnload().

The CMN folder

The CMN folder contains the following utility functions:

File

Description

dateID.js

Contains two functions, createDateID() and decipherDateID(). Given three strings, "dayFormat", "dateFormat", and "timeFormat", createDateID() creates an ID for them. Given a date array, decipherDateID() returns an array with three items: the dayFormat, the dateFormat, and the timeFormat.

displayHelp.js

Contains one function that displays the specified Help document.

docInfo.js

Contains functions that provide information about the user’s document. Operations performed by functions include returning an array of object references for a specified browser type and tag, returning all instances of a specified tag name, searching for a tag that wraps the current selection, and so on.

DOM.js

Contains general helper functions for working with the Dreamweaver DOM. Includes functions that get the root node of the active document, find a tag of a given name, create a list of nodes from the specified starting node, check whether a given tag is contained inside another tag, perform various operations on behavior functions, and more.

enableControl.js

Contains one function, SetEnabled(), which enables or disables a control based on the arguments it receives. It is OK to enable a control that is already enabled or disable a control that is already disabled.

errmsg.js

Contains logging functions for accumulating tracing output into an array of log pages that appear in a dialog box.

file.js

Contains functions pertaining to file operations. Functions let the user browse for local filename, convert the relative path to the file URL path, return the filename for the current document, determine if a specified document has been saved in current site and return the document-relative path, or determine if a specified file is currently open.

form.js

Contains functions that add a form around a given text string if a form does not already exist in the current document or AP element. Includes functions that determine if an object is a AP element and determine if the insertion point is inside a form.

handler.js

Contains functions that get a function for an event handler, add a function to an event handler, and delete a function from an event handler.

helper.js

Contains a handful of useful functions that replace encoding, unescape quotation marks ("), check whether a node is inside a selection range, and checks for duplicate object names.

insertion.js

Contains the insertIntoDocument() function, which inserts a text string into a document at the insertion point. Also contains the supporting functions getHigherBlockTag() and arrContains(). The getHigherBlockTag() function gets the next highest blockTag, as defined in the blockTags array, and the arrContains() function finds a specified item in an array.

localText.js

Reserved variables, not for general use. Use Startup/mminit.htm instead or use the strings from the Dreamweaver Configuration/Strings/*.xml files.

menuItem.js

Contains functions that add values to or remove values from a listed menu item.

niceName.js

Contains functions that convert an array of Object references to an array of simpler names.

quickString.js

Contains functions that aggregate smaller strings without doing a memory allocation each time.

string.js

Contains a generic set of functions for manipulating and parsing text strings. Functions include: extractArgs(), escQuotes(), unescQuotes(), quoteMeta(), errMsg(), badChars(), getParam(), quote(), stripSpaces(), StripChars(), AllInRange(), reformat(), trim(), createDisplayString(), entityNameEncode(), entityNameDecode(), stripAccelerator(), and SprintF().

TemplateUtils.js

Contains utility functions for Dreamweaver templates. Functions insert an editable region into a document, insert a repeating region into a document, scan a document for a specified editable region, and so on.

UI.js

Contains generic functions that control the UI. These functions find a designated object in the current document, load select list options with localized strings, return the attribute value for a selected option, and word-wrap the text message for an alert.

Other folders

The following list describes other folders of interest in the Shared folder:

Controls

The Controls folder contains the elements used to build a server behavior. These controls include interfaces for text and recordset menus.

Note: These controls are used by the Dreamweaver Server Behavior Builder and by many of the Dreamweaver server behaviors, but some are useful for managing a control in your extension.

Fireworks

The Fireworks folder has the supporting files for Fireworks integration.

UltraDev

Dreamweaver maintains this folder primarily for backward compatibility, and it should not be used for new extensions. Use the Dreamweaver Configuration/Shared/Common folder, where most of this functionality also exists. See The Common folder.

This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License  Twitter™ and Facebook posts are not covered under the terms of Creative Commons.

Legal Notices   |   Online Privacy Policy