[whatwg] Web Forms 2.0 - Comments on sections 1 and 2

fantasai fantasai.lists at inkedblade.net
Tue Jul 13 00:53:34 PDT 2004


Ian Hickson wrote:

> On Thu, 10 Jun 2004, Dean Edwards wrote:
> 
>>whilst we're talking about numbers...
>>a common scenario in web apps is to have a separate format for
>>displaying numbers (e.g. currencies). The user enters "19" but after
>>tabbing to the next field this is then displayed as "$19.00". focus/blur
>>events are usually used to format/unformat the underlying value. is it
>>too late to formalise something like this by introducing a "format"
>>attribute? i could have really used it on the last project i worked on.
> 
> 
> We could do that; could you propose some text? I'm not familiar with the
> requirements.
> 
> Would it just be:
> 
>    format="$%02.2d"
> 
> ...? Where that's basically a subset of the printf format specifier
> functionality?

For numbers, you'd just want to either append or prepend
a unit identifier. You *don't* want to reformat the number
itself like that; you'd lose the locale settings, and then
I might enter one-thousand-fifty instead of one-and-a-half.

~fantasai

-- 
http://fantasai.inkedblade.net/contact




More information about the whatwg mailing list