logo

Radio Button JavaScript

Client Webpage Code

Radio buttons allow the user to select only one option. A value is assigned to the radio button and submitted to the receiving webpage.

<%do while not rs.eof%>
<input type=radio name=chkPCLookupSelected value="<%=rs("cgrefn")%>">
<%rs.movenext%>
<%loop%>

Receiving Webpage Code

     if request("chkPCLookupSelected")<>"" then	
	sql="select * from mytable"
	sql=sql & " where referencenumber=" & request("chkPCLookupSelected")  
			
	set rs=connAS400.execute(sql)
	if not rs.eof then
		AssignVariables(rs)
	end if
      end if
s