Results window functions
185
Example
The following example checks for errors at the offset of the current selection in the document
and, if there are errors, displays them in the specified window (
floaterName
) of the Results
panel. Otherwise, it opens the Target Browser Check window of the Results panel and
displays the first visible item for the document.
var offset = dw.getDocumentDOM().source.getSelection()[0];
var errors =
dw.getDocumentDOM().source.getValidationErrorsForOffset(offset);
if ( errors && errors.length > 0 )
dw.showResults( errors[0].floaterName, errors[0].floaterIndex );
else
dw.showResults('btc', dw.getDocumentDOM().URL);
resWin.addItem()
Availability
Dreamweaver 4.
Description
Adds a new item to the Results window.
Arguments
resultWindowObj, strIcon
,
strDesc
,
itemData
,
iStartSel
,
iEndSel
,
colNdata
■
The
resultWindowObj
argument is the object that the
createResultsWindow()
function returns
.
■
The
strIcon
argument is a string that specifies the path to the icon to use. To display a
built-in icon, use a value "1" through "10"
instead of the fully qualified path of the icon.
Specify
"0"
(zero) for no icon. The following table shows the icons that correspond to the
values of "1" through "10":
■
The
strDesc
argument is a detailed description of the item. Specify
"0"
if there is
no description.
NO
TE
Use only on stand-alone results windows created with
dreamweaver.createResultsWindow()
. resWin.addItem() cannot be used with the built-
in results windows, including Validation, Browser Target Check, or Site Reports.
000_DW_API_Print.book Page 185 Wednesday, July 20, 2005 11:58 AM
Summary of Contents for DREAMWEAVER 8-DREAMWEAVER API
Page 1: ...Dreamweaver API Reference...
Page 16: ......
Page 28: ...28 The File I O API...
Page 38: ...38 The HTTP API...
Page 68: ...68 Flash Integration...
Page 100: ...100 The Database API...
Page 116: ...116 The JavaBeans API...
Page 144: ...144 The Source Control Integration API...
Page 146: ......
Page 254: ...254 Workspace...
Page 298: ...298 Site...
Page 354: ...354 Document...
Page 396: ...396 Page Content...
Page 488: ...488 Design...
Page 550: ...550 Code...