Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

jsp sending values

 
dale conn
Ranch Hand
Posts: 57
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi all i'm looping through a sql recordset and writing out on the page. each row has a send button. when i click the send button it goes to another jsp page where i'm prining out the vlaues i'm passing through from the first jsp page using request.getParameter("value1"), request.getParameter("value2")

However the values being passed are always the top row values regardless of the row i'm choosing




i get something like this

12345 321 send button
98765 654 eend button

When i click the send button, the values are always 12345 and 321, even if i press the 2nd button

can anyone help me out so whatever button i press i get the correct values passing through

many thanks
 
Tom Joiner
Ranch Hand
Posts: 47
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you made each separate table row its own form, that might help, it looks like they are all in one form.

Alternatively, change the name of every item to be unique per row, because currently you have many items with the same name, so it is just using the first one.
 
dale conn
Ranch Hand
Posts: 57
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for the reply.

Are you able to give me an example? I'm not too sure what you mean

Many thnaks
 
dale conn
Ranch Hand
Posts: 57
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
no worries sorted it
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic