[whatwg] Some questions to WF2

Ian Hickson ian at hixie.ch
Wed Dec 8 15:32:59 PST 2004


On Sun, 21 Nov 2004, [ISO-8859-1] Olav Junker Kjær wrote:
> Section 2.3
> > If the platform supports submitting a form implicitly (for example, on 
> > some platforms hitting the "enter" key while a text field is focused 
> > implicitly submits the form), then when doing so the first submit 
> > button, this default button, must be the one used to initiate form 
> > submission (and it will therefore be successful).
> 
> Does this imply that a form with no submit buttons (or input type=image) 
> can not be submitted?

Hm, good point. Browsers (even those that currently do the implied button 
thing) do allow that. Fixed.


> Button API:
> I noticed that button elements don't have the formchanged() method. Is 
> this intentional? Since buttons recieve formchanged and forminput 
> events, I would think that it should support formchanged() also.

Yeah, added. I have to say, I really don't like the changed() and 
formchanged() methods. If anyone has any better ideas for preventing 
duplication in the input="" and changed="" (or forminput="" and 
formchanged="") attributes, please let me know.

(I've renamed them to dispatchChanged() and dispatchFormChanged() for now. 
I don't know if it's better.)


> OTOH I think it is a bit strange that buttons support validation: 
> validate(), validity, validationMessage etc. How can a button be 
> invalid?

This is mainly so that you can loop through the form.elements array and 
not worry about checking that each control is not a button.


> The "data" attribute is not on the form DOM interface.
> The "target" attribute is not on the input or button interfaces 
> (although it is on the form interface)

Fixed.


> When might formchange be fired on fieldsets?
> According to section 7.1 (working draft) Formchange-events is dispatched
> to all controls in the elements array. Fieldsets are not part of the
> elements array.
> However, in appendix A it says "The onformchange and onforminput
> attributes are added to all form control elements (including fieldset
> and output)"

Oops. The text in the appendix was wrong. Fixed.


> 7) Does the "successful" property apply to submit buttons?

Yes. It will only be true during submission, though.

-- 
Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'


More information about the whatwg mailing list