User Guide
Code view functions 533
■ The startOffset argument is an integer that represents the offset from the beginning of
the document.
■ The endOffset argument is an integer that represents the end of the document.
Returns
A string that represents the text in the source code between the offsets start and end.
dom.source.getValidationErrorsForOffset()
Availability
Dreamweaver MX 2004.
Description
Returns a list of validation errors at the specified offset, or it searches from the offset for the
next error. If none are found the function, it returns
null.
Arguments
offset, {searchDirection}
■ The offset argument is a number that specifies the offset in the code for which the
function will return any errors.
■ The searchDirection argument, which is optional, is a string that specifies "empty",
"
forward" or "back". If specified, the function searches forward or back from the given
offset to the next characters with errors and returns them. If not specified, the function
simply checks for errors at the given offset.
Returns
An array of objects or the value null. Each object in the array has the following properties:
■ The message object is a string that contains the error message.
■ The floaterName object is a string that contains the name of the results window. You can
pass this value to the
showResults() or setFloaterVisibility() functions.
■ The floaterIndex object is an index of items in the floater results list.
■ The start object is the opening index of underlined code.
■ The end object is the closing index of underlined code.
NOTE
The returned floater indexes should not be stored because they can change frequently,
such as when documents are opened or closed.
000_DW_API_Print.book Page 533 Wednesday, July 20, 2005 11:58 AM