AnsweredAssumed Answered

programmatically check checkbox in toc widget

Question asked by joffreyj on Apr 12, 2013
Latest reply on Apr 24, 2013 by joffreyj
I am using the awesome toc widget, very new at arcgis and dojo and I am trying to check a checkbox on the toc widget when the user searches based on one of the layers.

For example, if the user searches based on "zip code", I would like to activate the zip code layer by checking the checkbox for "zip code" in the toc widget. I thought something like this (or some variation) would work:


<input type="checkbox" class="dijitReset dijitCheckBoxInput" data-dojo-attach-point="focusNode" data-dojo-attach-event="onclick:_onClick" value="on" tabindex="0" id="dijit_form_CheckBox_7" aria-checked="false" aria-disabled="false">

Also, if I succeed in checking the box, will this activate the widgets "onclick" event?

Can anyone help me with this? Thanks.