[whatwg] LABEL and radio/checkbox onclick

Olav Junker Kjær olav at olav.dk
Fri Aug 20 01:39:58 PDT 2004


Mikko Rantalainen wrote:
> Why not just fire click() for the submit button? I do this in my own 
> scripts that fix the stupid MSIE behavior. Sure, the server cannot know 
> if the user pressed ENTER or used mouse button but does it really matter?

This would work for <input type=submit>, but for <button type=submit> 
this would submit (name,innerHTML) rather than (name,value).
Also, we don't want to have the onclick event to fire on the button 
since the page author might have attached some custom script here, which 
should only be executed if the button was actually clicked. (Although 
one could argue that onclick *should* be fired, as the spec implies that 
the enter implicitly clicks the button - I'm not sure what is the right 
interpretation is here?)

Olav Junker Kjær




More information about the whatwg mailing list