J
Jason Dykes
I have a page that is database driven. The pages shows a user's name
and whether they have access to our site or not. this is done by
displaying two checkboxes positioned to the right of the users name.
The first checkbox is to deny the user access and is named something
like chkD followed by the user's id number from the database (ie;
chkD20). The second checkbox is to allow the user access and is named
chkA followed by the user's id number again (ie; chkA20). My question
is how do I get only one checkbox checked at a time for each user. In
other words, when the Allow checkbox(chkA20) is clicked, how do I
uncheck the Deny checkbox(chkD20) and vice versa? Source code follows
for possibly a better understanding of my situation. It is in
VBScript.
Do Until rs.EOF
Response.Write"<TR>" & vbcrlf
Response.Write"<TD width='50%'> " & rs(3) & ", " &
rs(1) & " " & rs(2) & "</TD>" & vbcrlf
Response.Write"<TD width='25%' align='center'><INPUT type='checkbox'
name='chkD" & rs(0) & "'"
if not rs(4) then response.write " checked "
response.write"></center></TD>" & vbcrlf
Response.Write"<TD width='25%' align='center'><INPUT type='checkbox'
name='chkA" & rs(0) & "'"
if rs(4) then response.write " checked "
response.write"></center></TD>" & vbcrlf
Response.Write" </TR>" & vbcrlf
rs.MoveNext
Loop
Thank you,
Jason
and whether they have access to our site or not. this is done by
displaying two checkboxes positioned to the right of the users name.
The first checkbox is to deny the user access and is named something
like chkD followed by the user's id number from the database (ie;
chkD20). The second checkbox is to allow the user access and is named
chkA followed by the user's id number again (ie; chkA20). My question
is how do I get only one checkbox checked at a time for each user. In
other words, when the Allow checkbox(chkA20) is clicked, how do I
uncheck the Deny checkbox(chkD20) and vice versa? Source code follows
for possibly a better understanding of my situation. It is in
VBScript.
Do Until rs.EOF
Response.Write"<TR>" & vbcrlf
Response.Write"<TD width='50%'> " & rs(3) & ", " &
rs(1) & " " & rs(2) & "</TD>" & vbcrlf
Response.Write"<TD width='25%' align='center'><INPUT type='checkbox'
name='chkD" & rs(0) & "'"
if not rs(4) then response.write " checked "
response.write"></center></TD>" & vbcrlf
Response.Write"<TD width='25%' align='center'><INPUT type='checkbox'
name='chkA" & rs(0) & "'"
if rs(4) then response.write " checked "
response.write"></center></TD>" & vbcrlf
Response.Write" </TR>" & vbcrlf
rs.MoveNext
Loop
Thank you,
Jason