Re: [whatwg] Two feature-suggestions for HTML5 (forms)

2009-07-01 Thread Ian Hickson

(Trimmed cc list to reduce cross-posting.)

On Mon, 8 Jun 2009, Asser Nilsson wrote:
 
 There are two things in HTML5-forms that are often made with Active 
 Technology like JavaScript, that would be very cool, if HTML5 could do 
 these things without Scripting:
 
 1. I've seen this at the online-dictionary dict.leo.org: they made a 
 JavaScript-function, that you can type the word to translate without the 
 text-box marked an the characters get in there. So, you don't have to 
 mark the right textbox before you type, but you can type, no matter to 
 look, if the box is marked. I think it would be a very nice feature for 
 HTML5-forms if this would work without Scripting... E.g. an option for 
 text-fields, that everythins typed on this site is typed into this field 
 (even if it is not highlighted).

This isn't really done on enough sites to warrant built-in support, I 
don't think.


 2. In search-boxes Javascript often is used for send every written 
 character to the server and the server return search-suggestions 
 as-you-type. If this is possible without Scripting only with HTML/CSS 
 this would be very cool.

This was possible in a previous incarnation of HTML5, but we removed 
support because it wasn't an especially popular feature, and it turns out 
to have some pretty subtle complications.

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


Re: [whatwg] Two feature-suggestions for HTML5 (forms)

2009-06-09 Thread Giovanni Campagna
Please don't cross-post to w3 lists and to whatwg lists.

2009/6/8 Asser Nilsson asser.nils...@googlemail.com:
 Hi!

 There are two things in HTML5-forms that are often made with Active
 Technology like JavaScript, that would be very cool, if HTML5 could do
 these things without Scripting:

 1. I've seen this at the online-dictionary dict.leo.org: they made a
 JavaScript-function, that you can type the word to translate without
 the text-box marked an the characters get in there. So, you don't have
 to mark the right textbox before you type, but you can type, no matter
 to look, if the box is marked. I think it would be a very nice feature
 for HTML5-forms if this would work without Scripting... E.g. an option
 for text-fields, that everythins typed on this site is typed into this
 field (even if it is not highlighted).

What about setting the autofocus attribute on the page?
Keys have various meaning in various points of the page and you should
not change that, but you can get the equivalent effect (user doesn't
have to click on the textbox).

 2. In search-boxes Javascript often is used for send every written
 character to the server and the server return search-suggestions
 as-you-type. If this is possible without Scripting only with
 HTML/CSS this would be very cool.

It is possible to do this with XForms, I guess. That is not exactly
declarative but has less problems that pure Javascript (if you don't
think that XForms is mainly implemented as Javascript, of couse)

 Of course, there are things where you need Scripting, but such basic
 features should be possible without scripting, only with HTML/CSS.
 (Many people deactivate Scripting.)

 Sorry for my bad english, but I really think these two things would be
 very nice features for coming versions of HTML.

 Greetings,
 Asser Nilsson




Giovanni