Loading ...
Sorry, an error occurred while loading the content.

Re: BUG? connection library appends the first submit found not the one pressed

Expand Messages
  • Peter Michaux
    ... Hi Thomas, Thanks for the reply. What ideas do you have to handle multiple button support? I was thinking of something like this
    Message 1 of 3 , Oct 27, 2006
    • 0 Attachment
      --- In ydn-javascript@yahoogroups.com, "Thomas S. Sha" <tsha@...> wrote:
      >
      > --- In ydn-javascript@yahoogroups.com, "Peter Michaux"
      > <petermichaux@> wrote:
      > >
      > > Hi,
      > >
      > > I'm reading the connection library form serialization code. In the
      > > case that appeneds the value of the pressed submit button, it looks
      > > like the value of first submit input found in the form is appended.
      > > This is not necessarily the button that was pressed. Is this true? Is
      > > there a reason for this design decision? If the server script depends
      > > on which button was pressed this doesn't look like it will supply the
      > > correct value.
      >
      > It was not so much a design decision, but a current limitation.
      > Multiple submit button support is in the development queue; and,
      > hopefully without adding any dependencies.

      Hi Thomas,

      Thanks for the reply.

      What ideas do you have to handle multiple button support?

      I was thinking of something like this

      <input type="submit" name="button1" value="asdf"
      onclick="YAHOO.util.Connect.setButton(this);">

      The recorded value would need to be removed immediately after
      serialization so that it is not submitted with the next form
      submission. The next submissions may be initiated by a button that
      doesn't call the setButton() method and therefore doesn't reset the
      stored button value.

      Peter
    Your message has been successfully submitted and would be delivered to recipients shortly.