This week's book giveaway is in the Kotlin forum.
We're giving away four copies of Kotlin in Action and have Dmitry Jemerov & Svetlana Isakova on-line!
See this thread for details.
Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

How to access h:dataTable in javascript ?  RSS feed

 
Vinodh Sa
Ranch Hand
Posts: 55
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,

Can anyone tell me that how can we access the h:dataTable or t:dataTable using javascript dynamically, based on the number of rows in the table ?
 
Bajrang Asthana
Ranch Hand
Posts: 32
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can give an id to h:dataTable and access it in javascript. In java script you can insert, delete and update any row,column and cell.
There are some links that can help you -

http://www.webmasterworld.com/javascript/3068770.htm
http://stackoverflow.com/questions/4401213/accessing-html-table-cell-data
http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/Q_23624269.html

However above links describes for html table. You can also use it for h:dataTable .
 
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!