onButtonClick

fires when the user clicks a button

void onButtonClick(string name){ ... };

Parameters

namestringcontrol name

Example

myForm.attachEvent("onButtonClick", function(name){
     // your code here
});

Details

example of init:

...
{type: "button", name: "btn2", value: "Submit"}
...
Back to top