File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Servlets and the fly likes selecting a row from table using radio buttons Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "selecting a row from table using radio buttons" Watch "selecting a row from table using radio buttons" New topic

selecting a row from table using radio buttons

Chak Terlapu
Ranch Hand

Joined: Oct 20, 2000
Posts: 32
I have a servlet which connects to a database and displays the table. I need to select the rows from the table and should be able to modify/delete it. I am planning to put radio buttons at the begining of each row so that the user can select a particular row. My question is if the user selects a row by clicking on radio button and clicks on modify/delete button, how can I send the entire row information to the modify or delete servlet which is another HTML page with just the row information and buttons at bottom. How will I know that this is the row that has been selected. Any help would be greatly appreciated.
Preethi Suryam
Ranch Hand

Joined: Nov 17, 2000
Posts: 92
Get the value of the radio button i.e in your case you will get the row number or row name.once you get the row number you can delete or modify that particular row.
I agree. Here's the link:
subject: selecting a row from table using radio buttons
Similar Threads
Capturing selected check boxes
selectOneRadio inside a columnEx
exception thrown from servlet function
Processing Radio Buttons in a Form/Servlet
how to pass field value in an IFrame to its parent