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

[whatwg] Form Serialization

From: Garrett Smith <dhtmlkitchen@gmail.com>
Date: Wed, 8 Aug 2007 13:42:08 -0700
Message-ID: <c9e12660708081342t1b319549kd6f42419f1996f48@mail.gmail.com>
Most libraries now are providing a way to serialize a form.

It would be useful to have:

 HTMLFormElement.prototype.toJSONString
 HTMLFormElement.prototype.getDataSetString

HTMLFormElement.prototype.toJSONString would return an object literal
that contains the enabled (not readonly) form element names as keys
and an array for each key's value.

aForm.getDataString() would return a serialized data set
representation of the form's successful controls. It would look just
like what you see in a GET query string or a POST body.

This does not cover binary files. Is it feasible to serialize a file?

This does not cover setting values, only reading them.

Garrett
Received on Wednesday, 8 August 2007 13:42:08 UTC

This archive was generated by hypermail 2.3.1 : Monday, 13 April 2015 23:08:36 UTC