Visual InterDev

       

Returns the number of items in the object.

Syntax

object.getCount()

Parameters

object

A script object.

Remarks

For Listbox objects, the number returned by getCount is always one greater than the value of the largest selectedIndex property.

For Recordset objects, getCount returns the number of records in the Recordset. If the Recordset is empty, -1 is returned.

Example

Display all the items in a listbox object using DHTML and JavaScript

   for ( i=0; i<lstTest.getCount(); i++)
   {
      alert("Item is: " + lstTest.getText(i));
   }