DHTMLxCombo checkbox toggle not working

I have a comboboxes created using DHTMLXCombo for my Gantt filter. but for some reason when I added the attach event, it stopped toggling. can anyone tell me what’s the problem here, any help is much appreciated

below is my code :

HTML

[code]

ALLALL
one
two
three

[/code] Javascript :

[code]var search_type_combobox;
var search_type_value = {‘ALL’: true};
//FILTER BY TYPE
function multiselect_filter(){

//SEARCH TYPE
search_type_combobox = dhtmlXComboFromSelect("search_type", "combo", 100, "checkbox");
search_type_combobox.enableFilteringMode(true);

//IT STOP TOGGLING WHEN I ATTACH THIS EVENT
search_type_combobox.attachEvent(“onCheck”, function(value, state){
var values = search_type_combobox.getChecked();
search_type_value = {};// put combo value into scope variable
for(var i = 0; i < values.length; i++){
search_type_value[values[i]] = true;// build hash for easy check later
console.log(i);
console.log(value);
console.log(search_type_value);
console.log(search_type_value[values[i]]);

    }
    gantt.render();// and repaint gantt
});
<!--Filter gantt by value of the scope variable-->
gantt.attachEvent("onBeforeTaskDisplay", function (id, task) {
    if(search_type_value['ALL'])
        return true;
    return !!search_type_value[task.search_type];
});

}[/code]