How can I get the onSubmit event sender in any browser? Or at least in FF and IE? Especially how event.srcElement in IE seems to be the target? Well, is it anything like explicitOriginaltarget in browsers other than FF?
I am looking for any solution in pure javascript, without jQuery.
What I want to do: I have a form. And depending on the sender, I want to perform different actions in the onSubmit(event) routine.
What I got in my init function:
var top_most_form = document.getElementById("upper_menu_form"); top_most_form.onsubmit=function(event){ var target = <apparently magical things have to happen here>; if ("upper_menu_form" == target.id) { AddSpinner(); AddStarttimeToForm(); AddThruputToUpperForm(); } else { return false; }
source share