Checkbox value not returned

Results 1 to 3 of 3

Thread: Checkbox value not returned

  1. #1
    Derry Connolly Guest

    Default Checkbox value not returned

    Hi,<BR>I&#039m trying to display the values from an access DB on a web page.<BR>Text values are returned correctly but the checkboxes remain blank even when it has the value "true" in the DB.<BR>Any suggestions ?<BR><BR>Land = rs("YN_Land")<BR>&#060;tr&#062;<BR> &#060;td align=right&#062;Land :<BR> &#060;td&#062;&#060;input type="checkbox" name="Land" value="&#060;%= Land %&#062;"&#062;&#060;/td&#062;<BR><BR>Excellent site by the way

  2. #2
    Stephan Zutterman Guest

    Default RE: Checkbox value not returned

    In HTML, checkboxes are set to true with the word CHECKED in the INPUT tag, so your code should become:<BR><BR>Land = rs("YN_Land")<BR>&#060;tr&#062;<BR>&#060;td align=right&#062;Land :<BR>&#060;td&#062;&#060;input type="checkbox" name="Land" &#060;% if Land then %&#062;checked&#060;%end if%&#062;&#062;&#060;/td&#062;<BR><BR>The value of LAND on your form is "on" though when checked, not TRUE!

  3. #3
    Derry Connolly Guest

    Default RE: Checkbox value not returned

    Perfect. Works a treat now. Thanks for your help.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •