Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

counting rows in javascript

 
kumar m
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,
I have problem in counting number of rows in a table and giving color to table data in javascript.
I'm able to dynamically add rows to html table, but how to count no. of rows in the table after adding rows.
Please give a solution to me to add row dynamically and also to count the rows.
I'm using insertRow and insertCell methods to add row dynamically in javascript.

waiting for your reply.
Thank you Regards
 
Daniel Ng
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
inserted.insertRow(string[] data, int index)
Use data.length to get the number of rows.
As for the color, I am not sure how to do that with insertRow().
 
Thomas Paul
mister krabs
Ranch Hand
Posts: 13974
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Moving this to the JavaScript forum. This forum is for discussing Java.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic