dojo checkbox problem

3526
2
03-20-2015 12:17 AM
NadirHussain
Occasional Contributor II

dear all,

var allInputs = dojo.query('input:checkbox', cp);

return all checkboxes from content pane in allinputs array.

                       allInputs.set("checked",false);//error

undefined is not a function.set statment producing error.please help how to uncheck the checkbox.

thanks in advance..

0 Kudos
2 Replies
SumitZ
by
New Contributor III

HI Nadir,

Try getting enclosed widget and then set the state.

var widget = dijit.getEnclosingWidget(allInputs[0]);

widget.set('checked', false);

OwenEarley
Occasional Contributor III

It appears like you have the letter 'o' and not the number 0 in your array index value.

This line:

allInputs.set("checked",false);//error

Should be:

allInputs[0].set("checked",false);//error

0 Kudos