wood burning stoves 2.0*
The moose likes JSP and the fly likes jsp sending values Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "jsp sending values" Watch "jsp sending values" New topic

jsp sending values

dale conn
Ranch Hand

Joined: Jun 16, 2006
Posts: 57
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

Joined: Sep 19, 2006
Posts: 47
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

Joined: Jun 16, 2006
Posts: 57
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

Joined: Jun 16, 2006
Posts: 57
no worries sorted it
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
subject: jsp sending values
Similar Threads
Cannot Compile Class error on Tomcat 6.0
Exam and WhizLabs!!!
Display of Latin Characters
How to store option format value in database in jsp
using getReader() of ServletRequest