DHTMLX Docs & Samples Explorer

attachEvent(evName, evHandler)

Attaches a user-defined handler to any available event.

Parameters:

  • evName - the event name;
  • evHandler - a user-defined handler that will be called when event occurs.

    var myEvent = myCalendar.attachEvent("onClick", function (){
        //event handler code
    })

Description:

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

See also: