Another DHTML Problem

Is there a way of finding the number of rows in a table using client VBScript DHTML without using a counter.
gfactorAsked:
Who is Participating?
 
boycey19Connect With a Mentor Commented:
All the table rows are stored within an array. To access the number of rows use:

tableObj.rows.length

So if you use this code:

<table id="tableElement">

<tr>

</tr>

<tr>

</tr>

</table>

<script language="VBScript">
<!--

document.write(tableElement.rows.length)

//-->
</script>

The output from the VBScript will be 2.

Boycey
0
All Courses

From novice to tech pro — start learning today.