Check documentation for the latest version 6.0 of dhtmlxSuite attachEvent DHTMLX Docs

attachEvent

adds any user-defined handler to available events

number attachEvent(string name,function handler);

Parameters

namestringname of the event
handlerfunctionuser-defined event handler

Returns

numberinternal event id, you can use it for detachEvent(id)

Example

// attach event
var evId = myComponent.attachEvent("eventName", function(){
    // your code here
});
 
// detach event
myComponent.detachEvent(evId);

Details
  • several handlers can be attached to one and the same event, and all of them will be executed
  • event names are case-insensitive
Back to top