ASP Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming Languages - MoreASP Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old September 3rd, 2003, 04:51 AM
aspuser25 aspuser25 is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Aug 2003
Posts: 141 aspuser25 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 6
Lightbulb radio button ... a very sily problem

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
%>

Reply With Quote
  #2  
Old September 3rd, 2003, 06:41 AM
totta2k totta2k is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Sep 2003
Location: Somewhere in Time
Posts: 1 totta2k User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Quote:
<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>

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

Reply With Quote
  #3  
Old September 3rd, 2003, 09:10 AM
aspuser25 aspuser25 is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Aug 2003
Posts: 141 aspuser25 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 6
Thumbs up

great it worked ..thanks!

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - MoreASP Programming > radio button ... a very sily problem


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 2 hosted by Hostway