Attaching events to forms

I want to achive in my form the onChange / onInputChange event listening capability used in this example in my own form object:

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. (78.6 KB)