[whatwg] Comments on Web Forms 2.0 Working Draft
whatwg.org at chsc.dk
Mon Jun 28 15:38:59 PDT 2004
Ian Hickson wrote:
> Generally though, it seems that the author would want to only set a
> control to a valid value... seems like bad UI for script to set a value
> and then later complain to the user that it isn't valid!
One scenario could be the following: A page contains a select box
containg a list of countries, and a select box for containing a list of
states/provinces in the selected country. When the country is changed,
the current selection in the state/province select is cleared (and the
control becomes invalid) and the select is filled with options for the
new country (or disabled, if state/province is not used in postal
addresses for that country).
Also it could be that the pattern or required attribute are changed by a
script instead of the value. This could be on a page with a select box
for choosing a country, and a text box for entering a postal code. The
pattern for the postal code control could depend on the country.
More information about the whatwg