[whatwg] Re: FormImplementation interface

Olav Junker Kjær olav at olav.dk
Fri Aug 27 13:58:06 PDT 2004

Ian Hickson wrote:
> But in any case, I've now removed the entire FormImplementation interface, 
> in favour of XMLHttpRequest in the Web Apps draft now. (There wasn't 
> anything that it could do which XMLHttpRequest couldn't do better, except 
> that it was one call, and we can always define a wrapper for 
> XMLHttpRequest later if required.)

I wonder if it would be useful with a somewhat higher level interface 
for posting data without worring about encoding or transport. The 
interface could take a collection of (name, value) pairs as input and 
would present the response in the same way, if the server returned xml 
formdata or something similar.

This might be useful for issues with complex overlapping forms, like the 
case with postcode or partnumber lookup as part of a larger form. It 
would only require minimal scripting to map form field values into the 

pf = new PseudoForm();
pf.data["address"] = realForm.fields["address"].value;
realForm.fields["postcode"].value = pf.data["postcode"];

This would allow much freedom in constructing forms orthogonal to the 
document structure. It could also be used for constructing forms where 
the controls are not actual input controls but some other custom dhtml. 
(It could even be used as a limited messaging or RPC client.)

Olav Junker Kjær

More information about the whatwg mailing list