I am fairly new to jquery and I am working with jsp and struts .as part of the application I have a survey form with a number of categories each with different set of questions, and each question with a number of possible answers to pick from as radio buttons. I want the user to be required to pick one answer for each question in each category before submitting the form and to give an error if they don't.
<s:iterator value="quelists">
<tr class="radioList">
<td>
<s:property value="surveyQuestion"/><span id="msg_selectError"/>
</td>
<td >
<s:iterator value="answerslists" status="status">
<s:radio value="selectedAnswers[%{#count}]"
name="selectedAnswers[%{#count}]"
list="#{id:answer}" required="true" theme="simple"/>
</s:iterator>
</td>
<s:set var="count" value="#count+1"/>
</tr>
</s:iterator>