Skip to main content
Participant
December 19, 2006
Question

dynamic checkbox

  • December 19, 2006
  • 2 replies
  • 391 views
I have created an update page with a dynamic checkbox but it won't stay checked. This is the code:

<input type="checkbox" name="Online" value=1 <%If (CStr(rsNews.Fields.Item("Online").Value) = CStr("true")) Then Response.Write("checked=""checked""") : Response.Write("")%>>

Can anyone help me please?

Cheers
This topic has been closed for replies.

2 replies

Inspiring
December 19, 2006
Try using True instead of true.

--
Jules
http://www.charon.co.uk/charoncart
Charon Cart 3
Shopping Cart Extension for Dreamweaver MX/MX 2004



LEEDS_UFCAuthor
Participant
December 20, 2006
Thank you guys. Both worked a treat. You're diamond gezzers!!!
Inspiring
December 19, 2006
LEEDS UFC wrote:

> I have created an update page with a dynamic checkbox but it won't stay
> checked. This is the code:
>
> <input type="checkbox" name="Online" value=1 <%If
> (CStr(rsNews.Fields.Item("Online").Value) = CStr("true")) Then
> Response.Write("checked=""checked""") : Response.Write("")%>>
>
Then
Response.Write(" checked")%>>

Mick