W3C home > Mailing lists > Public > whatwg@whatwg.org > August 2004

[whatwg] Re: FormImplementation interface

From: Olav Junker Kjr <olav@olav.dk>
Date: Fri, 27 Aug 2004 22:58:06 +0200
Message-ID: <412FA05E.5020202@olav.dk>
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 
dataset:

pf = new PseudoForm();
pf.data["address"] = realForm.fields["address"].value;
pf.submit(url)
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
Received on Friday, 27 August 2004 13:58:06 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 16:58:36 UTC