This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
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


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "Radi Button Validation" Watch "Radi Button Validation" New topic
Author

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.

anysuggstions

Thanks in advance
Sanny
Eric Pascarello
author
Rancher

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



that is the beasic idea.

Eric
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Radi Button Validation
 
Similar Threads
radio buttons selection
setting a radio button
selecting a radio button for IE & Netscape
Radio Buttons
checkbox