W3C home > Mailing lists > Public > public-html@w3.org > August 2007

Re: Form Serialization

From: Jon Barnett <jonbarnett@gmail.com>
Date: Thu, 16 Aug 2007 19:03:10 -0500
Message-ID: <bde87dd20708161703w5d358891mb14ebb26fe300c4a@mail.gmail.com>
To: "Garrett Smith" <dhtmlkitchen@gmail.com>
Cc: public-html@w3.org

WF2 describes for encoding types than HTML4

On 8/16/07, Garrett Smith <dhtmlkitchen@gmail.com> wrote:
> Proposal:
> interface HTMLFormElement {
>   String getDataSetString
>   String toJSONString
> };
> toJSONString would return an object literal that contains the FORM
> element's successful controls, using names as key and an LIST for each
> key's value.

Instead of this, would it be useful/possible to make JSON an encoding
type?  Is there a standard/common JSON MIME type?  application/x-json?

> getDataSetString() 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.

Would this string be encoded according to form.enctype?  Should it (be
overloaded to) accept a string argument to specify an enctype?

> For Binary Data, you can encode as JS escapes.

any method to make it easier for Javascript to upload a file would be
fantastic.  You should see the nasty hacks I use for this today
(actually, this afternoon...) - my hack involves changing the action
and target of a form, posting to a hidden iframe, and changing the
target and action back.
Jon Barnett
Received on Friday, 17 August 2007 00:03:16 UTC

This archive was generated by hypermail 2.3.1 : Thursday, 29 October 2015 10:15:25 UTC