Hi,
I set “onchange” event for element in form, but the function is not called after the field is modified …
=== CODE =================
function doOnClickIva(id){
IvaId = id;
if(id==""){
var inpId;
var inpDes;
var inpAli;
var inpDef;
}else{
var gridObj = $$(“GridIva”).item(id)
var inpId=id;
var inpDes=gridObj.des;
var inpAli=gridObj.ali;
var inpDef=gridObj.def;
}
dhx.ui ({
view: 'window',
head:{ view:"toolbar", type:"SubBar", elements:[
{ view:"button", label:"Aggiorna", click:"doAggIva" },
{ view:"button", label:"Annulla", click:"doAnnulla" },
{ view:"button", label:"Elimina", click:"doElimina" }
]},
body: { view: 'form', scroll: true,
elements: [
{ view: 'text', label: 'Codice', readonly: true, value: inpId, labelPosition: 'left', labelAlign: 'left', id: 'fId', inputPosition: 'left', inputWidth: '440', labelWidth: '120'},
{ view: 'text', label: 'Descrizione', readonly: false, value: inpDes, labelPosition: 'left', labelAlign: 'left', id: 'fDes', inputPosition: 'left', inputWidth: '440', labelWidth: '120'},
{ view: 'text', label: 'Aliquota', readonly: false, value: inpAli, labelPosition: 'left', labelAlign: 'left', id: 'fAli', inputPosition: 'left', inputWidth: '440', labelWidth: '120'},
{ view: 'checkbox', label: 'Default', readonly: false, value: parseFloat(inpDef), labelPosition: 'left', labelAlign: 'left', id: 'fDef', inputPosition: 'left', inputWidth: '440', labelWidth: '120'}
],
id: 'form_iva'
},
position: 'center',
width: 440,
height: 220,
is_popup: false,
move: false,
modal: false,
id: 'win_modifica'
});
$$("fDes").attachEvent("onchange", Dotest);
}
====================
If I change “onchange” with “onitemclick” the function is called.
Where mistake ?
Thanks.