I want to achive in my form the onChange / onInputChange event listening capability used in this example in my own form object:
[url]http://www.dhtmlx.com/docs/products/dhtmlxForm/samples/04_events/07_inputchange_event.html[/url]
This is the code I am using to setup listeners:
$$('topForm').attachEvent("onChange", genericHandlerFactory('onChange')); // DOES NOT work
$$('topForm').attachEvent("onInputChange", genericHandlerFactory('onInputChange')); // DOES NOT work
$$("grid").attachEvent("onAfterSelect", genericHandlerFactory('onAfterSelect')); // DOES work
Imported scripts: TouchUI, DHtmlX Common
This is how I use the form
dhx.ui({...
{ view:"form", id:"topForm",
elements:[{view:"text", label: 'Name', position: "label-left", id: "name"},]}
...
})
“genericHandlerFactory” logs calls to handlers in console.log:
genericHandlerFactory = function(evType) {
return function(name, value, form){
console.log(evType + ': ' + JSON.stringify(arguments));
};
};
Please help me understand how to use this feature.
forum_listen_fire_events.zip (78.6 KB)