Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
The moose likes HTML, CSS and JavaScript and the fly likes Passing Table values to action class Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Elasticsearch in Action this week in the Big Data forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "Passing Table values to action class" Watch "Passing Table values to action class" New topic

Passing Table values to action class

Vijay jai Singh

Joined: Jan 07, 2009
Posts: 26
In one of my web page i have HTML table. This table will have 0 or more rows and each row has 3 column.

it is like this:

i want to transfer values of columns to Action class.

is there any way to
1) get number of rows in table
2) transfer values using javaScript and how will i get in my action class.

Pradeep Adibatla
Ranch Hand

Joined: Oct 27, 2009
Posts: 336
requirement is not clear .Be more detailed... how are values set in the table??
Jeanne Boyarsky
author & internet detective

Joined: May 26, 2003
Posts: 31585

1) You can look through the DOM using JavaScript. It's easier if you use a library like jQuery to do so.
2) You can transfer the values to a hidden form field and submit that in your form.

[OCA 8 book] [Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
Don't get me started about those stupid light bulbs.
subject: Passing Table values to action class