Creating and then accessing lots of RADIO buttons
Hi,
I want to dynamically create lots of radio buttons on a jsp page.
I want to create some large numbers ofradio button pairs as below.
<INPUT type="checkbox" name="checks" value="check1">1
<INPUT type="checkbox" name="checks" value="check2">2
<INPUT type="checkbox" name="checks1" value="check3">1
<INPUT type="checkbox" name="checks1" value="check4">2
I can create unlimited radio buttons using the code below
<%
for(int count = 0; count < 100; count++)
{
out.print("<INPUT type=\"radio\" name=\"Radio" + count +"\" value=\"" + count +"\" />Positive");
out.print("<INPUT type=\"radio\" name=\"Radio" + count +"\" value=\"" + count +"\" />Negative");
count++;
out.print("<br>");
}
%>
But the problem is then how to access the values of these radio buttons when this page is posted to a Servlet?
Is there any way of creating large pair of radio buttons in JSP?
or someobject representing Array of radio buttons?
Thanks for reading.
Message was edited by:
vsood2

