JohannIcon
Programmer
Hi All,
I have a complicated problem here, at least for me. I am generating a set of dynamic checkboxes, depending on the amount of entries I have in a database like this:-
<% if not rs1.eof then 'If not EOF of rs then print
Response.Write (rs1.Fields("menuName"
)
%>
</span> </font></div></td>
<td> <div align="left"><font face="Arial, Helvetica, sans- serif" size="2">
<%
response.Write "<input name=menuCheck" & n+1 & " type=checkbox id=menuCheck value=" & rs1("menuID"
& ">"
%> <input type="hidden" name="menuID" value="<%=rs1("menuID"
%>"> <%
rs1.movenext
n = n + 1
end if %></span>
Now my aim is if the user clicks on the checkbox, I get the menuID to insert it into the database, and that I am already doing successfully like this:-
if NOT MenuCheckVal = "" then
'*** the insertion clause
sqlInsertMenu = "INSERT INTO clientMenu (clientID,menuID,menuActive) VALUES (" & ClientID & "," & MenuCheckVal & ",1);"
rsInsertMenu.Open (sqlInsertMenu)
but what if the user does not click on the checkbox in the previous page? How can I get the menuID value so that I insert a '0' in the active field?
Can you please help me out here?
Thanks very much for your help and time!
I have a complicated problem here, at least for me. I am generating a set of dynamic checkboxes, depending on the amount of entries I have in a database like this:-
<% if not rs1.eof then 'If not EOF of rs then print
Response.Write (rs1.Fields("menuName"
%>
</span> </font></div></td>
<td> <div align="left"><font face="Arial, Helvetica, sans- serif" size="2">
<%
response.Write "<input name=menuCheck" & n+1 & " type=checkbox id=menuCheck value=" & rs1("menuID"
%> <input type="hidden" name="menuID" value="<%=rs1("menuID"
rs1.movenext
n = n + 1
end if %></span>
Now my aim is if the user clicks on the checkbox, I get the menuID to insert it into the database, and that I am already doing successfully like this:-
if NOT MenuCheckVal = "" then
'*** the insertion clause
sqlInsertMenu = "INSERT INTO clientMenu (clientID,menuID,menuActive) VALUES (" & ClientID & "," & MenuCheckVal & ",1);"
rsInsertMenu.Open (sqlInsertMenu)
but what if the user does not click on the checkbox in the previous page? How can I get the menuID value so that I insert a '0' in the active field?
Can you please help me out here?
Thanks very much for your help and time!