User Guide
380 Appendix A: The Shared Folder
The CMN folder
The CMN folder contains the following utility functions:
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 filename for 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 layer.
Includes functions that determine if an object is a layer and
determine if the cursor 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 for 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.