...

View Full Version : Yes or No - Tick Boxes



christrinder
02-26-2003, 06:07 PM
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

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

christrinder
02-26-2003, 06: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">

arnyinc
02-26-2003, 06: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">

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

Chris



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum