User Guide
Chapter 3: WDDX JavaScript Objects 567
col
Integer or string specifying the column of the value to be returned.
Return
value
Returns the value in the specified row/column position.
Usage Call this function to access a value in a WDDX record set.
Example This example calls the getField function (the variable r is a reference to a
WddxRecordset instance):
for (row = 0; row < nRows; ++row)
{
o += "<tr>";
for (i = 0; i < colNames.length; ++i)
{
o += "<td>" + r.getField(row, colNames[i]) + "</td>";
}
o += "</tr>";
}
getRowCount
Indicates the number of rows in the WddxRecordset instance.
Syntax
object
.getRowCount( )
object
Instance name of the WddxRecordset object.
Return
value
Integer. Returns the number of rows in the WddxRecordset instance.
Usage Call this function before a looping construct to determine the number of rows in the
record set.
Example This example calls the getRowCount function:
function dumpWddxRecordset(r)
{
// Get row count
nRows = r.getRowCount();
...
for (row = 0; row < nRows; ++row)
...