Results window functions
173
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.
Note:
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.
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.
•
The
itemData
argument is a string you can use to store specific data about the item being
added such as a document line number.
•
The
iStartSel
argument is the start of selection offset in the file. Specify the value
null
if
you are not specifying an offset.
•
The
iEndSel
argument is the end of selection offset in the file. Specify the value
null
if you
are not specifying an offset.
•
The
colNdata
argument is an array of strings that provide the data for each column (that is, if
there are 3 columns, an array of 3 strings).
000_DW_API_Print.book Page 173 Wednesday, August 20, 2003 9:14 AM
Содержание DREAMWEAVER MX 2004
Страница 1: ...Dreamweaver API Reference...
Страница 24: ...24 Contents...
Страница 32: ......
Страница 70: ...70 Chapter 5 Fireworks Integration...
Страница 76: ...76 Chapter 6 Flash Integration...
Страница 116: ...116 Chapter 9 The JavaBeans API...
Страница 140: ......
Страница 152: ...152 Chapter 11 Application...
Страница 218: ...218 Chapter 12 Workspace...
Страница 248: ...248 Chapter 13 Site...
Страница 292: ...292 Chapter 14 Document...
Страница 378: ...378 Chapter 17 Design...
Страница 430: ...430 Chapter 18 Code...
Страница 486: ...486 Index...