tags:

views:

18

answers:

1

Hi,

I use javascript confirmation pop-up for one of the rich faces command button functionalities. On the same page, I also have a rich:scrollableDataTable. Is it possible for me to show the number of data rows in the table on the java script confirmation pop-up? If yes, how can i achieve that?

Thanks in advance - Avinash.

+1  A: 

Using jQuery:

var count = $("#yourTableId tbody tr").length;

and then pass it to the pop-up.

Bozho
I'd however put a `tbody` in between to avoid that header/footer rows are included.
BalusC