Re: FORM successful submit element?

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 UTC