Code:
this.SearchForm.loadStruct("search.xml", function(){
this.attachEvent("onChange", function (id, value){
return FormSearchEx(id,value,this.MyFinestra);
});
});
search.xml
<items>
<item type="hidden" name="id" value="" label="id" />
<item type="input" name="codice" value="" label="Codice" />
<item type="input" name="descrizione" value="" label="Descrizione" />
<item type="checkbox" name="assegnato" value="" label="Assegnato" />
<item type="button" value="Cerca"/>
</items>
Why, when the checkbox was checked the onChange don’t return value?
Olga
#2
In case of checkbox you should use 3rd parameter of “onChange” event handler:
myForm.attachEvent("onChange",function(id,value,state){
//state - checked state (for checkboxes and radios only )
});
docs.dhtmlx.com/doku.php?id=dhtm … t_onchange
Thank you… but where is written this info?
Not here (docs.dhtmlx.com/doku.php?id=dhtm … t_onchange) for sure!
There is in some place a more updated documentation?
Add this code to be more clear:
myform.attachEvent(“onChange”, function (id, value,state){
//any custom logic here
});
Olga
#6
Thanks, documentation fixed