Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
Do Until rs.EOF
'some random fields like name and something else
Response.Write "<tr><td>" & rs("assgn_name") & "</td><td>" & rs("assgn_another_field") & "</td>"
'your hidden field for the id and the checkbox
Response.Write "<td><input type=""hidden"" name=""a_id"" value=""" & rs("assgn_id") & """><input type=""checkbox"" value=""done"" name=""chk_" & rs("assgn_id") & """"
'note the checkbox tag is still open
If rs("assgn_status") = True 'assume in this case we decided True means done
Response.Write " checked"
End If
'close the checkbox regardless of whether we checked it or not, finish the row
Response.Write "></td></tr>"
rs.MoveNext
Loop
Dim idlist
idlist = Split(Request.Form("a_id"), ", ") 'note we split on comma space, browsers place a comma space between each value just to make life difficult for us :)
Dim ctr
For ctr = 0 to UBound(idlist)
If Request.Form("chk_" & idlist(ctr)) <> "" Then
'this checkbox has a value, so it is complete
Else
'this checkbox doesn't have a value, so it is incomplete
End If
Next