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

[whatwg] UA validation and the submit event

From: Ian Hickson <ian@hixie.ch>
Date: Mon, 14 Aug 2006 09:12:03 +0000 (UTC)
Message-ID: <Pine.LNX.4.62.0608140901460.5340@dhalsim.dreamhost.com>
On Tue, 17 Jan 2006, Hallvord Reiar Michaelsen Steen wrote:
>
> Kayak.com is in trouble because they've set a maxlength that is smaller 
> than some of the data the script sets input value to. (I'm sending them 
> some feedback about that). However, the site shows an interesting 
> problem: the UA (testing in Opera 9) does not submit the form because of 
> the validation problem, but the onsubmit event has been called, meaning 
> the site has disabled its submit button. Hence, the user has no way to 
> fix the data and resubmit (even if she actually understands what the 
> error is).
> 
> Should we really fire onsubmit if the UA prevents submitting the form? 
> Button-disabling-on-submit scripting isn't exactly rare..

Based in your implementation experience, I've changed it to fire the 
'submit' event after the validation stage. You can now no longer "fix up" 
the values from script before submission, and any changes made during the 
onsubmit handler can no longer be validated.

Please let me know if that is ok.


On Wed, 18 Jan 2006, Hallvord Reiar Michaelsen Steen wrote:
> 
> I'm not sure if making that impossible would be a big limitation. I 
> assume the scripts could use other events like onchange events of other 
> form elements.

I think that's fair enough.

-- 
Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'
Received on Monday, 14 August 2006 02:12:03 UTC

This archive was generated by hypermail 2.3.1 : Monday, 13 April 2015 23:08:28 UTC