Specifications

Server Behaviors 167
Type
Attribute.
Required
Yes.
Values
aboveHTML[+weight], belowHTML[+weight], beforeSelection, replaceSelection,
wrapSelection, afterSelection, beforeNode, replaceNode, afterNode,
firstChildOfNode, lastChildOfNode, nodeAttribute[+attribute]
aboveHTML[+weight] inserts the text above the <HTML> tag (suitable only for server code). The
weight can be an integer from
1 to 99 and is used to preserve relative order among different
participants. By convention, recordsets have weight 50, so if a participant refers to recordset
variables, it needs a heavier weight, such as
60, so the code is inserted below the recordset, as
shown in the following example:
<insert location="aboveHTML+60">
If no weight is provided, it is internally assigned a weight of 100 and is added below all
specifically weighted participants, as shown in the following example:
<insert location="aboveHTML">
belowHTML[+weight] is similar to the aboveHTML location, except that participants are added
below the closing </HTML> tag.
beforeSelection 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.
replaceSelection replaces the current selection with the text. If there is no selection, it
inserts the text at the end of the <BODY> tag.
wrapSelection balances the current selection, inserts a block tag before the selection, and
adds the appropriate closing tag after the selection.
afterSelection 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.
beforeNode 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 parameter of the
paramObj. The user-definable name of this parameter must be
specified by the
nodeParamName attribute (see Attribute: nodeParamName on page 168).
In summary, if your location includes the word
node, make sure that you declare the
<nodeParamName> tag.
replaceNode replaces a node with the text.
afterNode inserts the text after a node.
firstChildOfNode 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.