Results 1 to 4 of 4

Thread: Checkbox values

  1. #1
    Join Date
    Nov 2003
    Posts
    2

    Unanswered: Checkbox values

    Hi,
    I've a big problem..(that's for me)
    My database has a field and the value can be 0 or 1.
    I want that if value is 0, my results page gives checkbox checked , else if the value is 1 my results page gives checkbox unchecked...
    Sorry for the English, thanks
    Bye

  2. #2
    Join Date
    Nov 2003
    Posts
    3

    checkbox

    This is not a big problem.Assign the recordset value into a variable and keep this variable in a hidden field.Write a javascript or VB script function to ON the checkbox

  3. #3
    Join Date
    Nov 2003
    Posts
    2
    Thank you very much for the answer,
    now I've the problem how to write the VB function to ON checkbox...
    Bye

  4. #4
    Join Date
    Dec 2003
    Location
    Philippines
    Posts
    11

    Re: Checkbox values

    This is what I do:
    <%if recordset.field.value = 0 then%>
    <input type="checkbox" name="checkbox1" checked>
    <%else%>
    <input type="checkbox" name="checkbox1">
    <%end if%>

    You can cotrol your html tags with your serverside scripts. Try it.

Posting Permissions

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