You are here: Reference > JavaScript > client-side > ActiveX > ADO > properties > recordNumber

recordNumber property

Browser support:
Returns an integer value that indicates the ordinal position of the item within the data set that generated the current object.
This property can be used, if the object is created with data binding techniques.


You can find the related objects in the Supported by objects section below.
This property is read-only.

Possible values:

Integer that retrieves the ordinal position.
Default: this property has no default value.

Example HTML code 1:

This example illustrates the use of the recordNumber property:
    <script type="text/javascript" for="myTr" event="onclick">
        alert ("This is the " + this.recordNumber + ". record in the data set.");
    <xml id="movies">
        <?xml version="1.0"?>
                <name>Clark Kent</name>
                <name>Lois Lane</name>
                <name>Fred Flintstone</name>
                <name>Barney Rubble</name>

    <b>Click a row in the Table to get its recordNumber!<b>
    <table width="100%" cellpadding="0px" cellspacing="2px" border="1px" datasrc="#movies" datapagesize="1" id="myTable">
            <tr id="myTr">
                <td><span datafld="name"></span></td>
                <td><span datafld="jobtitle"></span></td>
                <td><span datafld="born"></span></td>

    <input type="button" onclick="myTable.firstPage ()" value="|< First " />
    <input type="button" onclick="myTable.previousPage ()" value="< Previous " />
    <input type="button" onclick="myTable.nextPage ()" value=" Next >" />
    <input type="button" onclick="myTable.lastPage ()" value=" Last >|" />
Did you find this example helpful? yes no

Supported by objects:

Related pages:

External links:

User Contributed Comments

Post Content

Post Content