This week's book giveaway is in the Performance forum.
We're giving away four copies of The Java Performance Companion and have Charlie Hunt, Monica Beckwith, Poonam Parhar, & Bengt Rutisson on-line!
See this thread for details.
Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

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

 
raka sinha
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 4864
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic