aspose file tools*
The moose likes Struts and the fly likes How to select row from HTML Table and submit value to other jsp Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "How to select row from HTML Table and submit value to other jsp " Watch "How to select row from HTML Table and submit value to other jsp " New topic
Author

How to select row from HTML Table and submit value to other jsp

raka sinha
Greenhorn

Joined: Jan 22, 2007
Posts: 15
I have a JSP where the resultset are displayed in the form of table.

My Requirement is to select particular row which will lead in change in clour of that row and on submitting the value will pass to onother jsp

How to approach this.

Please help
Merrill Higginson
Ranch Hand

Joined: Feb 15, 2005
Posts: 4864
One way to do it would be to create a hidden field in your JSP named something like "selectedId". You would then write a JavaScript function fired by the onclick event of each <tr> element in the table that would apply a different CSS style to the row and use the DOM to get some value displayed in the current row and set selectedId to that value.


Merrill
Consultant, Sima Solutions
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to select row from HTML Table and submit value to other jsp
 
Similar Threads
setting values for table cells in javascript
how to pass cell values(td) as hidden things to Action class(struts-2)?
setting values in jsp+struts2
SQL query????
passing JS values between 2 pages