W3C home > Mailing lists > Public > www-dom@w3.org > July to September 2008

Re: FORM successful submit element?

From: Garrett Smith <dhtmlkitchen@gmail.com>
Date: Wed, 6 Aug 2008 23:32:49 -0700
Message-ID: <c9e12660808062332s2a315753ld26860d4c80ffa43@mail.gmail.com>
To: "Boris Zbarsky" <bzbarsky@mit.edu>
Cc: "DOM mailing list" <www-dom@w3.org>

On Mon, Aug 4, 2008 at 12:46 PM, Boris Zbarsky <bzbarsky@mit.edu> wrote:
> Garrett Smith wrote:
>>
>> The browsers seem to have an internal mechanism for determining which
>> button is successful. Is the form's successful button exposed in the
>> DOM?
>
> No, it is not.
>

Thank you, Boris. That is what I thought.

In serializing a FORM, I don't usually need to get the input that was
clicked, but for completeness, it should be present.

If this successful submit element were to be exposed, it would have to
be through an event, I think. I'll probably want to take this over to
the html5 list, but the idea is to get a form data as an object or
string.

<form method="multipart/form-data">
  <input name="file" type="file">
  <input name="fname" type="text">
</form>

form.onsubmit = function(e) {
  if(event.getBinaryString) {
  // Get Serialized Data.
    alert(event.getBinaryString());
  }
};


Garrett

> -Boris
>
Received on Thursday, 7 August 2008 06:33:25 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Friday, 22 June 2012 06:13:59 GMT