Adobe 38040334 - Dreamweaver CS3 User Manual page 278

Extending dreamweaver
Hide thumbs Also See for 38040334 - Dreamweaver CS3:
Table of Contents

Advertisement

<updatePattern paramName="rs" >
/(\b)\w+(\.Field\.Items)/
</updatePattern>
<updatePattern paramName="col">
/(\bItems\(")\w+("\))/
</updatePattern>
The literal parentheses, as well as other special regular expression characters, are escaped by preceding them with a
backslash (\). The middle expression, defined as
and
, respectively. The values
rs
col
Multiple occurrences of the same pattern can be updated simultaneously by using the regular expression global flag
after the closing slash (such as
g
If the participant text is long and complex, you might need multiple patterns to update a single parameter, as shown
in the following example:
<% ...
Recordset1.CursorType = 0;
Recordset1.CursorLocation = 2;
Recordset1.LockType = 3;
%>
To update the recordset name in all three positions, you need three update patterns for a single parameter, as shown
in the following example:
<updatePattern paramName="rs">
/(\b)\w+(\.CursorType)/
</updatePattern>
<updatePattern paramName="rs">
/(\b)\w+(\.CursorLocation)/
</updatePattern>
<updatePattern paramName="rs">
/(\b)\w+(\.LockType)/
</updatePattern>
Now you can pass in a new value for the recordset, and it is precisely updated in three locations.
<updatePattern> attributes
The following items are valid attributes of the
paramName
Description
This attribute indicates the name of the parameter whose value is used to update the participant. This parameter
should match the ones that are specified in the insertion text and search parameters.
Parent
updatePattern
Type
Attribute.
Required
Yes.
, is updated with the latest value that passed in for parameters
\w+
and
can be precisely updated with new values.
RS1
author_id
.
/pattern/g)
updatePattern
tag.
DREAMWEAVER CS3
272
Extending Dreamweaver

Advertisement

Table of Contents
loading

This manual is also suitable for:

Dreamweaver cs3

Table of Contents