Skip to content

Instantly share code, notes, and snippets.

@benwilber
benwilber / gist:1628716
Created January 17, 2012 20:32
finding button used to submit a form
dojo.connect(dojo.byId("id_form"), "onsubmit", function(event) {
dojo.query(event.target, ":active").forEach(function(node, idx, arr) {
if (node.id == "id_button1") {
dojo.stopEvent(event);
// do something special of button1 is clicked
}
});
});