Event occurs when user clicks button. Event doesn't occur for default commands, such as “save, validate, reset, remove”
Parameters of event
myform.attachEvent("onButtonClick", function(name, command){ // any custom logic here });
Example of init
... {type: "button", name: "btn2", value: "Submit", command: "customCommand"} ...