- Thu Dec 14, 2017 5:08 pm
#812558
Hi,
I have a problem (probably really simple )
I have a checkgroup "checkgroup1" with three values 1, 2, 3
I want to check what values were selected: 1 , 1 and 2, 2 and 3, etc. with the option getValue() and do some math that depends on the checkgroup selection.
Unfortunately I can't get value when more than one option from checkgroup1 is selected:
function checkgroup_math()
{
if ($("#checkgroup1").getValue() == "1"){
function do_math(){
...
...
...
}
do_math();
}
else { }
$("#checkgroup1").setOnchange(checkgroup_math);
How to: if ($("#checkgroup1").getValue() == value 1 and value 2, etc. )
By the way.. Is it better to use getValue or setOnchange( function(newVal, oldVal)?
Thanks for help
Regards,
I have a problem (probably really simple )
I have a checkgroup "checkgroup1" with three values 1, 2, 3
I want to check what values were selected: 1 , 1 and 2, 2 and 3, etc. with the option getValue() and do some math that depends on the checkgroup selection.
Unfortunately I can't get value when more than one option from checkgroup1 is selected:
function checkgroup_math()
{
if ($("#checkgroup1").getValue() == "1"){
function do_math(){
...
...
...
}
do_math();
}
else { }
$("#checkgroup1").setOnchange(checkgroup_math);
How to: if ($("#checkgroup1").getValue() == value 1 and value 2, etc. )
By the way.. Is it better to use getValue or setOnchange( function(newVal, oldVal)?
Thanks for help
Regards,