View Full Version : Yes or No - Tick Boxes

02-26-2003, 05:07 PM

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?



02-26-2003, 05:25 PM
You could use radio box's instead.

02-26-2003, 05:32 PM
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">

02-26-2003, 05:38 PM
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">

02-26-2003, 07:54 PM
I knew it would be something simple like that! Thanks mate.


EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum