Regarding fetching data from external resources, the specification states:
There are two scenarios where authors may wish data to be fetched from an external file to fill forms. In the first, a select's options are replaced by options from an external file. In the second, a form's values are prefilled from an external data source.
In both cases, the prefilling may either be full, in which case the previous contents are removed first, or incremental, in which case the fetched data is in addition to the data already in the form.
select
elementsThe formdata
XML file associated with the following form first
clears all of the existing repetition blocks. Then it adds two repetition blocks
with indexes 100 and 101. Then it prefills the values of these two repetition blocks.
data
DOM property dynamically on select
elementsThe following tests are adapted from an example in the Filling select
elements section.
The eight following select
elements should have exactly the same contents. Note that only the first four will work in Internet Explorer 7.
data
DOM attribute set on statically created element:
data
content attribute set on statically created element:
select
element dynamically created; data
DOM attribute set:
select
element dynamically created; data
content attribute set with setAttribute(...)
:
data
DOM attribute set on statically created element:
data
content attribute set on statically created element:
select
element dynamically created; data
DOM attribute set:
select
element dynamically created; data
content attribute set with setAttribute(...)
: