Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Radi Button Validation

 
Sanny kumar
Ranch Hand
Posts: 53
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Guys,

i have dynamic radio buttons i want to write script to select anyone of the radio button

a sample code as follows:

for(int i=0;i<=100;i++)
{%>
<input type="radio" value="10" name="cb<%=i++%>">Always
<input type="radio" value="9" name="cb<%=i++%>">Sometimes
<input type="radio" value="8" name="cb<%=i++%>">Rarely
<input type="radio" value="7" name="cb<%=i++%>">Never</td>
<%}%>
inthis i want to select atleast one radio button for each i value.

anysuggstions

Thanks in advance
Sanny
 
Eric Pascarello
author
Rancher
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
loop through each one and check



that is the beasic idea.

Eric
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic