;

PDA

Click to See Complete Forum and Search --> : Ok, how about toggle checkboxes?


dniezby
01-05-2006, 07:42 PM
Well, my brain is fried with trying to get this combobox stuff to work so, what would I have to do to have several checkboxes that share the same variable.

For example:

Poll: Who is your favorite actor?
Let's assign the variable "actor" to the checkbox.

box1 = Joe
box2 = Mike
box3 = Robert

BTW, it needs to make sure that ONLY one of the options are selectable. So if the user selects, Joe and tries to select Mike, Joe will turn off and Mike will now be selected.

dniezby
01-05-2006, 08:04 PM
Nevermind, I think I just found an example from Chris...I don't understand it yet, but I see that the AS works. So, let me just ask this, what does || mean? Or or And? and does this all have to be on the same line?

if (first.text == "" || last.text == "" || address.text == "");

Chris_Seahorn
01-05-2006, 08:33 PM
if (first.text == "" || last.text == "" || address.text == "");
//if any of the values equal whatever....do something...

|| = OR

if (first.text == "" && last.text == "" && address.text == "");
//if ALL of the values equal whatever....do something....

&& = AND

dniezby
01-05-2006, 08:39 PM
Thank you....Again.

BTW, I finally figured out what the heck it was that was happening in the example you sent me with the two check boxes... I can't believe I missed that you were turning off the other checkbox when the other checkbox onChange and that onChange it would write text into a field.

So, now I've got that working...My plan is almost complete.

Chris_Seahorn
01-05-2006, 08:56 PM
Good deal. Drop me a line when it's done.