|
|
|
|
![]() ![]() |
Jan 9 2006, 08:46 PM
Post
#1
|
|
|
Super Member ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Members Posts: 407 Joined: 13-December 04 Member No.: 2,696 |
I'd like to add a checkbox for each row so that the user can move to process the checked items to the next page.
I want the checkbox to take the value of the primary key from the database so assuming that blabla=rs.fields("code") where the code is the primary key how can I add a dynamic checkbox to this table for each row CODE <table border="1" align="center">
<tr> <% for each field in rs.fields %> <td><center> <% response.write("" & field.name & "") %> </center> </td> <%next %></tr> <%do until rs.eof for each field in rs.fields%> <td><center> <% response.write( "" & field.value & "") %>   </center></td> <%next%> </tr> <%rs.movenext loop%> </table> <%rs.close conn.close set rs=nothing %> </table> |
|
|
|
Jan 9 2006, 10:17 PM
Post
#2
|
|
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Members Posts: 1,161 Joined: 9-May 05 From: Brisbane, QLD Member No.: 6,818 |
CODE <td><input type="checkbox" name="?" value="<% =(rs.fields("primaryKey")) %>"></td> If you want the checkbox to be selected based on a certain parameter, it'd be: CODE <td><input type="checkbox" name="?" value="<% =(rs.fields("primaryKey")) %>" <% if (rs.fields("primaryKey") = something then response.write "checked" end if %>></td>
|
|
|
|
![]() ![]() |
Similar Topics
|
Lo-Fi Version | Time is now: 26th July 2008 - 01:52 PM |