Nodeparamname – Adobe Extending Dreamweaver CS4 User Manual
Page 274

268
EXTENDING DREAMWEAVER CS4
Server behaviors
•
The belowHTML
[+weight]
value is similar to the
aboveHTML
value, except that participants are added below the
closing
/HTML
tag.
•
The beforeSelection value inserts the text before the current selection or insertion point. If there is no selection, it
inserts the text at the end of the
body
tag.
•
The replaceSelection value replaces the current selection with the text. If there is no selection, it inserts the text at
the end of the
body
tag.
•
The wrapSelection value balances the current selection, inserts a block tag before the selection, and adds the
appropriate closing tag after the selection.
•
The afterSelection value inserts the text after the current selection or insertion point. If there is no selection, it
inserts the text at the end of the
body
tag.
•
The beforeNode value inserts the text before a node, which is a specific location in the DOM. When a function such
as
dwscripts.applySB()
is called to make the insertion, the node pointer must pass in as a paramObj parameter.
The user-definable name of this parameter must be specified by the
nodeParamName
attribute (see
In summary, if your location includes the word
node
, make sure that you declare the
nodeParamName
tag.
•
The replaceNode value replaces a node with the text.
•
The afterNode value inserts the text after a node.
•
The firstChildOfNode value inserts the text as the first child of a block tag; for example, if you want to insert
something at the beginning of a
FORM
tag.
•
lastChildOfNode inserts the text as the last child of a block tag; for example, if you want to insert code at the end of
a
FORM
tag, which is useful for adding hidden form fields.
•
nodeAttribute[+attribute] sets an attribute of a tag node. If the attribute does not already exist, this value creates it.
For example, use
to set the
ACTION
attribute of a form. This variation changes the user’s
FORM
tag from