Adobe 38040334 - Dreamweaver CS3 User Manual page 269

Api reference
Hide thumbs Also See for 38040334 - Dreamweaver CS3:
Table of Contents

Advertisement

Returns
The converted string.
dreamweaver.scanSourceString()
Availability
Dreamweaver UltraDev 1.
Description
Scans a string of HTML and finds the tags, attributes, directives, and text. For each tag, attribute, directive, and text
span that it finds, the
scanSourceString()
supports the following callback functions:
openTagBegin()
openTagEnd()
closeTagBegin()
closeTagEnd()
directive()
attribute()
text()
Dreamweaver calls the seven callback functions on the following occasions:
Dreamweaver calls
1
openTagBegin()
each empty tag (for example,
the tag (for example,
"font"
before the beginning of the tag. The function returns
After
2
openTagBegin()
function accepts two arguments, a string that contains the attribute name (for example,
string that contains the attribute value (for example,
a Boolean value that indicates whether scanning should continue.
3
After all the attributes in the tag have been scanned, Dreamweaver calls
function accepts one argument, the document offset, which is the number of bytes in the document before the end
of the opening tag. It returns a Boolean value that indicates whether scanning should continue.
4
Dreamweaver calls
closeTagBegin()
arguments, the name of the tag to close (for example,
in the document before the beginning of the closing tag. The function returns a Boolean value that indicates whether
scanning should continue.
After
5
closeTagBegin()
function accepts one argument, the document offset, which is the number of bytes in the document before the end
of the closing tag. It returns a Boolean value that indicates whether scanning should continue.
6
Dreamweaver calls the
directive()
The
function accepts two arguments, a string that contains the directive and the document offset,
directive()
which is the number of bytes in the document before the end of the closing tag. The function returns a Boolean value
that indicates whether scanning should continue.
function starts a callback function that you must supply. Dreamweaver
for each opening tag (for example,
or
). The
<img>
<hr>
openTagBegin()
or
) and the document offset, which is the number of bytes in the document
"img"
executes, Dreamweaver calls
"#000000"
for each closing tag (for example,
"font"
returns, Dreamweaver calls the
function for each HTML comment, ASP script, JSP script, or PHP script.
<font>
function accepts two arguments: the name of
if scanning should continue or
true
for each HTML attribute. The
attribute()
or
). The
"foo.gif"
openTagEnd()
</font>
) and the document offset, which is the number of bytes
function. The
closeTagEnd()
DREAMWEAVER CS3
API Reference
, as opposed to
) and
</font>
if it should stop.
false
attribute()
or
) and a
"color"
"src"
function returns
attribute()
. The
openTagEnd()
). The function accepts two
closeTagEnd()
264

Advertisement

Table of Contents
loading

This manual is also suitable for:

Dreamweaver cs3

Table of Contents