Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 5 of 5
  1. #1
    Regular Coder
    Join Date
    Nov 2002
    Location
    Loughborough (UK)
    Posts
    209
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Unhappy Yes or No - Tick Boxes

    Hello,

    I'm programming a data collection site for work in ASP. On one of the pages the user selects from a series of yes or no tick (check) boxes. However, the way it is at the moment, they can actually tick both. Is there a way of setting-up the boxes in pairs, so that when they select one then another, it automatically unchecks the first box?

    Thanks,

    Chris

  • #2
    Regular Coder
    Join Date
    Jun 2002
    Posts
    626
    Thanks
    0
    Thanked 0 Times in 0 Posts
    You could use radio box's instead.

  • #3
    Regular Coder
    Join Date
    Nov 2002
    Location
    Loughborough (UK)
    Posts
    209
    Thanks
    0
    Thanked 0 Times in 0 Posts

    radio boxes

    I thought they might be different. I can't say I've ever used them before. How do you write the code to use them in groups so they are interdependent, i.e. as oppossed to the code below?

    <input type="radio"><input type="radio">

  • #4
    Regular Coder
    Join Date
    Jan 2003
    Posts
    867
    Thanks
    4
    Thanked 8 Times in 8 Posts
    Give them the same name, but different values.

    <input type="radio" name="age" value="1">
    <input type="radio" name="age" value="2">
    <input type="radio" name="age" value="3">
    <input type="radio" name="age" value="4">
    <input type="radio" name="age" value="5">

  • #5
    Regular Coder
    Join Date
    Nov 2002
    Location
    Loughborough (UK)
    Posts
    209
    Thanks
    0
    Thanked 0 Times in 0 Posts

    D'oh!

    I knew it would be something simple like that! Thanks mate.

    Chris


  •  

    Posting Permissions

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