Forums Register Login
Radio Button Selection
I have one dyanamic form with multiple questions and answers, answers are of radio button types.

When user selects thje radio button in one question, the other questions radio button gets deselected. How can I put one radio button group for one question and other radio button for another set of question and so forth.

here is my code.


ansr = rs2.getString("ANSWR_CODE");


qstn = rs.getString("SRVY_QSTN");
desc = rs.getString("QSTN_DESC");


<td width="12">
<%= qstn%>.</td>

<td width="400">
<%= desc%> </td>
<td width="700" colspan="2">
ob = v1.get(i).toString();
<input name="radio" type="RADIO" value="<%=ob%>">

Basically, each group of radio buttons needs to have a different name. Maybe you could use the question id as the radio button name?
Moved to the HTML forum as this really isn't to do with JSP.
If you try to please everybody, your progress is limited by the noisiest fool. And this tiny ad:
Download Free Java APIs to Work with Office Files and PDF

This thread has been viewed 881 times.

All times above are in ranch (not your local) time.
The current ranch time is
Dec 12, 2018 11:20:59.