Wrox Home  
Search P2P Archive for: Go

  Return to Index  

application_development thread: Creating lists of input using Radio / Checkboxes


Message #1 by "Ashima Gupta" <ashima.gupta@c...> on Tue, 11 Mar 2003 16:23:12
I need something like this...

AND OR NOT <Name>
@     @     @   Tim<value="Tim">
@     @     @   Rob<value="Rob">
@     @     @   Cathy<value="Cathy">
..... and so on.

Basically, I am specifying a query criteria here, choosing the names I 
want in my AND, OR  and NOT conditions. Now @ could be either radio or 
checkbox, but either is not giving me the full functionality that I want. 
I need radio like ability so that if a user selects a name for one 
condition , he cannot select it for another. So across a row, I should be 
able to choose only one criteria. But in that case, I need to give the 
same name to the radio buttons in one row. That means if I have a list of 
300, I will have 300 different input elements and how do I collect all 
elements of each condition on a list?

If each @ is a checkbox, then I can give all AND checkboxes the same name 
and so on to collect all names for one condition in a list. but then how 
do I add the functionality to make sure the user cannot select more than 
one conditional operator for a name. 

And in each case, if a user deselects the condition and chooses another 
for the same name, it should get reflected in the list of values that I'm 
collecting, probably in a hiddeen variable.  
I thought about adding the element value to a list at onclick but then 
how will I remove it if later user deselects the chosen option?  I could 
use onSubmit function, if only I could make the checkboxes behave like 
radio for each row while keeping the name same for a column (AND, OR or 
NOT). I can't think of how to use onSubmit with radio cause I would have 
to check for 300 different input elements!!! 

Thanks in advance for your suggestions!

Ashima

  Return to Index