[Javascript] Which submit caused the event?

Hassan Schroeder hassan at webtuitive.com
Wed Jan 2 10:52:09 CST 2013


On 1/1/13 7:48 PM, Mike Dougherty wrote:

> Should this event registration even be done in markup?  If the script tag
> with the document.onclick registration failed for some reason, this form
> would be completely broken.

/*smacks head*/

My earlier post was an utterly trivial throwaway page based on Tedd's 
example to demonstrate one single thing, event.target, and deliberately
stuck close to his original markup for clarity.

But you want to analyze an obviously contrived example "form" with three
submits and NO DATA FIELDS for production-phase best practices? Really?

In any case, if you thought that demonstration of event.target lacking,
why not post your own improved version?

-- 
:about => about.me/hassanschroeder
:email  => hassan at webtuitive.com
:twitter => @hassan
:voice  => +1 408-621-3445


More information about the Javascript mailing list