Check documentation for the latest version of dhtmlxSuite attachEvent DHTMLX Docs

attachEvent

adds any user-defined handler to available events

number attachEvent(string name,function handler);
namestringname of the event
handlerfunctionuser-defined event handler
numberinternal event id, you can use it for detachEvent(id)

Example

// attach event
var evId = myWins.attachEvent("eventName", function(){
    // your code here
});
 
// detach event
myWins.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