W3C home > Mailing lists > Public > whatwg@whatwg.org > August 2004

[whatwg] LABEL and radio/checkbox onclick

From: Olav Junker Kjr <olav@olav.dk>
Date: Fri, 20 Aug 2004 10:39:58 +0200
Message-ID: <4125B8DE.1050802@olav.dk>
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
Received on Friday, 20 August 2004 01:39:58 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 16:58:36 UTC