Meaningless Drivel is fun!*
The moose likes Servlets and the fly likes request.getParameterValues() for radio buttons Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "request.getParameterValues() for radio buttons" Watch "request.getParameterValues() for radio buttons" New topic
Author

request.getParameterValues() for radio buttons

Jeff Dube
Ranch Hand

Joined: Jun 14, 2001
Posts: 44
Hi,
I work with a form and I want to display a table which indicates the choices made by the user. I must check check boxes and radio buttons. The following method functions well for the text area:
<tr>
<td align="right">
<B>Name</B>
</td>
<td align="left">
<%request.getParameterValues(Name);%
</td>
</tr>
But i nee to do the same with the radio buton and check boxes.
Can somebody help me?
Thanks
Jeff
Alag Solai
Greenhorn

Joined: Jun 26, 2001
Posts: 3
Hi,
on the client side create all check box and radio button INPUT html tags with same name.
Then you can use request.getParameter(valueofNameattribute) for Radio button and request.getParameterValues(valueofNameattribute) for checkboxes.
request.getParameterValues returns array of strings, so you can look through to find out the options selected by the user.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: request.getParameterValues() for radio buttons
 
Similar Threads
JSP Help Regarding the Radio Button
Enable-Diable Radio Buttons
Storing the value of a radio button
Problem while receiving parameters..
Switching form action based upon radio selection