Reputation: 872
In my page, for first time I will show only 10 records out of 36, if viewer click next button it shows next 10 records out of 36.
My problem is table row count on table footer
I don't know how to count table row on changing (meaning when we click next button it should say "showing 10 to 20 of 36 records".
My output:
Expected outputs:
after clicking next button:
Sample code:
<tfoot>
<c:choose>
<c:when test="${empty model}">
<tr>
<td align="left" colspan="11" style="color: orange; font-size: 12pt;">No records
found!</td>
</tr>
</c:when>
<c:otherwise>
<tr>
<td align="left" colspan="11" style="color: orange; font-size: 10pt;">Showing 1 to
${stlRec} of ${ttlRec} entries
</tr>
</c:otherwise>
</c:choose>
</tfoot>
Upvotes: 1
Views: 729
Reputation: 710
The solution is very simple but you have to do some work.
i am 100% sure that this trick will solve your problem, because 3 days earlier i had done the same thing ha ha ....so enjoy, thanks. :)
Upvotes: 2
Reputation: 76
You can use datatables, It will satisfy all your queries and has much more extras.
Or using jquery,
var row = $('#myTable tr').length;
Upvotes: 3