It's not a secret anymore!
The moose likes HTML, CSS and JavaScript and the fly likes Radi Button Validation Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "Radi Button Validation" Watch "Radi Button Validation" New topic

Radi Button Validation

Sanny kumar
Ranch Hand

Joined: May 18, 2005
Posts: 53
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.


Thanks in advance
Eric Pascarello

Joined: Nov 08, 2001
Posts: 15385
loop through each one and check

that is the beasic idea.

I agree. Here's the link:
subject: Radi Button Validation
It's not a secret anymore!