I have a list of radio buttons. Each radio button has a dynamic name. Is there a way to check if they are all selected? Because most radio validation scripts uses a static name.

<% 
Dim sql,objRs,intRecord
Call OpenDbconn()
Set objRs = Server.CreateObject("ADODB.Recordset")
sql=" select * from Review_Sheet ORDER BY Q_ID "
objRs.Open SQL, Dbconn,1,2
intRecord =1
Do While Not objRs.EOF 
%>   
    <tr>  
    <td nowrap="nowrap"><% =intRecord  %></td>
    <td><% =objRs("Question") %></td>
    <td align="center" nowrap="nowrap"><input type="radio" name="Q_<% =objRs("Q_ID")%>" id="<% =objRs("Q_ID")%>" value="1" />Yes</td>
    <td align="center" nowrap="nowrap"><input type="radio" name="Q_<% =objRs("Q_ID")%>" id="<% =objRs("Q_ID")%>" value="0" />No</td>
    <td align="center" nowrap="nowrap"><textarea name="Comments_<% =objRs("Q_ID")%>" id="Comments" cols="40" rows="5"></textarea>
    </td>
    </tr>
<%
intRecord = intRecord + 1
objRs.MoveNext
Loop

objRs.Close
set objRs=nothing
'call closeDbconn()
%>

I would like to make sure the user selects a radio button. (as in a Yes, No set) By default none of the buttons are selected.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.