Dynamic Updation of Checkboxex in ASP
Hi,
I am in deep trouble, I have to update some checkbox fields dynamically in the way that if one check box is checked and i uncheck it and press submit then after processing it should be shown unchecked.
I tried so many approaches but failed. Please help me. Here is my code which I am using to update checkbox fields.
dim password, arrgroup, supsql1, supsql2, supsql3, supsql4, suprs1, suprs2, suprs3, suprs4, i, maxpri, chksql, chksql2, chkrs, chkrs2
password = request.form("password")
arrgroup = Split(Request.Form("group"), ",") 'this is checkbox field
supsql4 = "select a.GROUP_NAME, b.P_NO, a.GROUP_ID, b.STATUS "&_
"From groups a, priv_leges b "&_
"where a.group_id = b.group_id(+) "&_
"And b.P_NO(+) = '"&session("edit_pno")&"'"&_
"Order By a.Group_id"
set suprs4 = cnn.Execute(supsql4)
For i = 0 to Ubound(arrgroup)
if cint(arrgroup(i)) <> cint(suprs4("group_id")) and suprs4("status") = "" then
'------- code for updation goes here -------
elseif cint(arrgroup(i)) = cint(suprs4("group_id")) and suprs4("status") = "y" then
'------- code for updation goes here -------
end if
Next
|