[whatwg] Comments on Web Forms 2.0 Working Draft
Ian Hickson
ian at hixie.ch
Wed Jun 30 06:07:35 PDT 2004
On Tue, 29 Jun 2004, Christian Schmidt wrote:
>
> 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).
Well, the required="" validation criteria is updated straight away, so
that would work.
It's only custom validity that needs resetting. (And if you use the
onchange="" handler to do the checking, you need just call changed() on
the control when you change the value in a way that needs revalidation.)
> 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.
Again, pattern and required take effect immediately, so that works.
--
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