|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
i am sure this is a very silly problem but i am not getting it....
i want radio button to appear on each line whihc is happening but if i check on every button it gets checked!!!!!!!!! whereas the main function of radio button is that u can select only one. here is my code: <% DIM SQL DIM RSA DIM BGC dim iCount iCount = 0 set RSA = Server.CreateObject("ADODB.Recordset") RSA.OPEN "SELECT sc.student_id,si.student_name,sc.story_id, sc.status_student, tc.status_teacher FROM student_content sc, student_info si, teacher_content tc, story_table st where (sc.student_id = si.student_id and sc.story_id = st.story_id) and (tc.student_id = si.student_id)", "DSN=school" Do while not RSA.EOF %> <html> <head> <title> none </title> </head> <body> <form method="post" action="teacher.asp"> <table> <tr> <td><input type=radio name=R<%=iCount%>></input> <%= RSA.Fields ("student_id").Value %></td> <td bgcolor=" & BGC & "> <%= RSA.Fields ("student_name").Value %></td> <td bgcolor=" & BGC & "> <%= RSA.Fields ("story_id").Value %></td> <td bgcolor=" & BGC & "> <%= RSA.Fields ("status_student").Value%></td> <td bgcolor=" & BGC & "> <%= RSA.Fields ("status_teacher").Value %></td> </tr> </table> </body> </html> <% iCount = iCount + 1 rsa.movenext loop %> |
|
#2
|
|||
|
|||
|
Quote:
to solve this problem, you have to name ALL the radio-buttons with the same name, and change the value. example <input type=radio name=Rx value=<%=iCount%>></input> <%= RSA.Fields ("student_id").Value %> so when you submit the form, the URL will be like "index.asp?Rx=xyz " where xyz is the value of the selected radio-button. shalom |
|
#3
|
|||
|
|||
|
great it worked ..thanks!
|
![]() |
| Viewing: Dev Shed Forums > Programming Languages - More > ASP Programming > radio button ... a very sily problem |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|