• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

how to capture dynamically generated value

 
pramodh somashekara
Ranch Hand
Posts: 62
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,

I have a jsp page which displays a dynamically generated table of values which has two columns of information.

Column1 Column2
100 some info
200 some more info
300 some other info
...

The values 100, 200, 300 are all dynamically generated and can vary each time.

What I want to do is, whenever user clicks on any of these values (i.e. 100 or 200 or 300 etc), I should capture this value and pass it to the next jsp/servlet page for further processing.

Please let me know how I can capture this value whenever user click on any of these values.
[ April 15, 2006: Message edited by: Bear Bibeault ]
 
Vikrant Pandit
Ranch Hand
Posts: 245
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Pramod,

You can consider writing your table generation code as follows

<table>
// some logic to decide the number of rows generated
<tr>
<td><a href="yournextservlet?value=<%=value%>"><%=value%></a></td>
<td>Your info</td>
</tr>
</table>

Hope this helps

Vivek
 
pramodh somashekara
Ranch Hand
Posts: 62
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Vivek Pandey, I am able to do it.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic