Created
January 17, 2012 20:32
-
-
Save benwilber/1628716 to your computer and use it in GitHub Desktop.
finding button used to submit a form
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | |
} | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment