The Dreamweaver JavaScript API > File manipulation functions > dreamweaver.setUpFind() |
Availability
Dreamweaver 3.0
Description
Prepares for a text or HTML source search by defining the search parameters for a subsequent dw.findNext() operation.
Arguments
searchObject
searchObject is an object for which the following properties can be defined:
searchString is the text to search for. |
|
searchSource is a Boolean value indicating whether to search the HTML source. |
|
{matchCase} is a Boolean value indicating whether the search is case-sensitive. If this property is not explicitly set, it defaults to false. |
|
{ignoreWhitespace} is a Boolean value indicating whether white space differences should be ignored. ignoreWhitespace defaults to false if useRegularExpressions is true and true if useRegularExpressions is false. |
|
{useRegularExpressions} is a Boolean value indicating whether the searchString uses regular expressions. If this property is not explicitly set, it defaults to false. |
Returns
Nothing.
Enabler
None.
Example
The following code demonstrates three ways to create a searchObject object:
var searchParams;
searchParams.searchString = 'bgcolor="#FFCCFF"';
searchParams.searchSource = true;
dw.setUpFind(searchParams);
var searchParams = {searchString: 'bgcolor="#FFCCFF"', searchSource: true};
dw.setUpFind(searchParams);
dw.setUpFind({searchString: 'bgcolor="#FFCCFF"', searchSource: ¬
true});