Get ready for BLACK FRIDAY shopping starting in

Forums

This topic is locked

Dynamic Checkbox bolean from textfields?

Posted 19 May 2002 16:39:11
1
has voted
19 May 2002 16:39:11 Bob Vigen posted:
Hi, I have made a user profile with multipleselect checkboxes, they insert to one field in the databse as text according to value.

Now I want the user to be able to update this, by bringing the checkboxes up again with his last choices checked. But cant get it to work. Im using Charons extension, and adjusted it as follows:

<input <% if rsAdds("JAD_CATS" = "rsCatsCheck("CAT_NAME"" then Response.Write "CHECKED"%> type="checkbox" name="checkCat" value="<%=(rsCatsCheck.Fields.Item("CAT_NAME".Value)%>">

Im probably not formulating this correctly ...
if rsAdds("JAD_CATS" = "rsCatsCheck("CAT_NAME""

Help Please
Thanks
Bob

Replies

Replied 20 May 2002 01:20:46
20 May 2002 01:20:46 Andrew Watson replied:
Remove the Quotes from this...

"rsCatsCheck("CAT_NAME""

so it reads..

rsCatsCheck("CAT_NAME"

This should work..

Cheers
LEED


:: Son, im Thirty.... ::
Replied 20 May 2002 02:13:25
20 May 2002 02:13:25 Bob Vigen replied:
Thanks for your reply Leed.
It doesnt seem to work though. All chackboxes show unchecked.

Any other sugestions?
Thanks
Replied 21 Jan 2006 02:24:41
21 Jan 2006 02:24:41 johan deketelaere replied:
Had the same problem.
This should work:

<input <%If rcupdate.Fields.Item("sold".Value = TRUE Then %> checked="checked" <% End If %> name="sold" type="checkbox" id="sold" value="checkbox" />

Reply to this topic