You're telling me everything except what I asked for: I need to know about
your database. I need to know about the columns in your database table (not
all of them - just the relevant ones - the primary key, the field that will
contain the data controlled by the checkbox). Not just their names ... I
need to know their datatypes. Again, the best way to convey that information
can be found in
www.aspfaq.com/5006.
From your description, it no longer sounds as if you need a client-side
solution, so we will continue this discussion here. Please provide the
information requested in my first paragraph so I can begin to help you.
Also, I need to know what you want the application to do after the user
clicks the checkboxes in your html table. It is easy enogh to process the
multiple checkbox selections in another page ... I just need to know what
you want that page to do with the records that were selected.
Here is a quick generic demonstration:
page1.htm:
<html><body>
<form method="post" action="page2.asp">
<table>
<tr>
<td>
<input type="text" value="First record" name="data1">
</td>
<td>
<input type="checkbox" name="selector" value="1">
</td>
</tr>
<tr>
<td>
<input type="text" value="Second record" name="data2">
</td>
<td>
<input type="checkbox" name="selector" value="2">
</td>
</tr>
<tr>
<td>
<input type="text" value="Third record" name="data3">
</td>
<td>
<input type="checkbox" name="selector" value="3">
</td>
</tr>
</table>
<input type="submit" value="Submit">
</form>
</body></html>
page2.asp:
<%
dim key
Response.write "Here is all the data submitted by the form:<BR>"
for each key in Request.Form
Response.Write key & ": " & Request.Form(key) & "<BR>"
next
dim selected
selected=request.form("selector")
Response.write "<BR>The following records were selected:<BR>"
Response.write selected & "<BR><BR>"
Response.write "Here is where I process the selections:<BR>"
dim ar, i, id, data
if len(selected) > 0 then
response.write "<table border=""1""><tr><th colspan=""2"">"
response.write "Selected Data" & "</th></tr>"
ar=split(selected,",")
for i = 0 to ubound(ar)
id=trim(ar(i))
data = request.form("data" & id)
ar(i)="<tr><td>" & id & "</td><td>" & data & "</td></tr>"
next
response.write join(ar,vbcrlf)
response.write "</table>"
else
response.write "No records were selected"
end if
%>
Bob Barrows