Hello everybody...
could somebody help me to solve this problem??
It's only 1 checkbox that looping into many checkbox.. Then,I juz want to update the checkbox. How to get the value of the checkbox that had being ticked for save?

The code as below:

<%Do Until Data.EOF%>
 <tr>
<td width="4%"><input name="proj_access" id="proj_access" type="checkbox"></td>
<td width="96%"><SPAN class="small"><%=data("project_name")%></SPAN></td>
</tr>
<%Data.MoveNext
  Loop%>

Thanx for your advance..

Dear,
there is certainly a better solution, but I solved this problem as follows:
1. <%Do Until Data.EOF%>
2. <tr>
3.<td width="4%"><input name="proj_access_<%=data("id")%>" id="proj_access" type="checkbox"></td>
4. <td width="96%"><SPAN class="small"><%=data("project_name")%></SPAN></td>
5. </tr>
6. <%Data.MoveNext
7. Loop%>

Now you can extract the ID of you data from any checkbox.

Thanks for your assist.
I had run the code but error occurs for that addition syntax..
The manner is how to get the value from the database into the edit page. or how to pass the values from the previous page into this page.

Hope you can understand the manner..

Hi,
I understand the problem. Try to solve it this way:

In the first page, you put checkboxes like this:
<td width="4%"><input name="chkbx" value="<%=data("id")%>" id="proj_access" type="checkbox"></td>

In the processing page you have Request.Form('chkbx") = 1, 3, 5, 6

Now you can split the chkbx:

Dim selected_ids, i
selected_ids = split(Request.Form('chkbx"), ",", "")

For i = LBound(selected_ids) to UBound(selected_ids)
Response.Write "ID " & i & ": " & selected_ids(i) & "<br />"
Next

Now you get a list of all ids you have selected.

For processing, use for...next and retrieve the ids.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.