[whatwg] introduction, plus some form input ideas

Ian Hickson ian at hixie.ch
Wed Oct 22 02:19:45 PDT 2008

On Mon, 30 Jan 2006, Ric Hardacre wrote:
> hello, i'm an asp developer in the uk and have a couple of suggestions... no
> doubt selfishly to make my life easier one day :-) these could probably do
> with their own threads if they're deemed worthy of discussion but let's just
> throw them out there:
> 1. form tag:
>    send="all" , (default, send all fields to server in get/post)
>    send="changed" , only send hidden fields and fields that have been changed
> by the user
> the idea being that if i'm running a datagrid then there's no point sending a
> ton of data back and forth if the user only edits a couple of cells. but the
> hidden form data will still be needed in any case so i can still connect the
> data sent to the user who sent it!

I've noted this as a feature for a future version. I haven't added it to 
HTML5 yet because I don't want to get too far ahead of the browsers (they 
tend to not implement things when the spec is too far ahead of them).

> 2. select tag:
>    selectedindex="[num]"
> implicitly set the selected index, instead of having to parse all the option
> tags and insert a "selected" string, much easier to bind to server side data,
> an invalid value (such as -1 or greater than the number of option tags) would
> mean none are selected. this would obviously not apply to multiple-selects

You can do this from script at the moment (setting the .selectedIndex 
attribute). I haven't added it to the markup side yet. It doesn't seem to 
add much other than convenience (you can already do this with selected="", 
as you noted). Adding features has a high cost, even for simple features 
like this, and I'm not sure we can really justify the cost here.

> 3. input tags:
>    validate="[regex]"
> implicitly set a regular expression to which the inputted data must 
> conform, so a value of regex="([0-9]*)\.[0-9][0-9]" would (assuming my 
> top-of-the-head regexp isn't totally fubar) only allow the user to enter 
> a number in currency format (any number of digits, a full stop and two 
> digits). though how to enforce it is another question, leave it up to 
> the agent? simply not respond if any other key was pressed? would it 
> need a hint to fill out default formatting too, appending the .00 if it 
> is left off, etc.

This is now in HTML5, usng the pattern="" atribute. 

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