DHTMLX Docs & Samples Explorer

onButtonClick Event

Event occurs when user clicks button. Event doesn't occur for default commands, such as “save, validate, reset, remove”

Parameters of event

  • name - name of related input
  • command- command attribute, optional
myform.attachEvent("onButtonClick", function(name, command){
     // any custom logic here
  });

Example of init

...
{type: "button", name: "btn2", value: "Submit", command: "customCommand"}
...