I have a .submit()
event set up for form submission. I also have multiple forms on the page, but just one here for this example. I\'d like to know which submi
You want to use window.event.srcElement.id like this:
function clickTheButton() {
var Sender = window.event.srcElement;
alert("the item clicked was " + Sender.id)
}
for a button that looks like:
you will get an alert that reads: "the item clicked was myButton.
In your improved example you can add window.event.srcElement to process_form_submission and you will have a reference to whichever element invoked the process.