I can't really imagine a page with thousands of forms and buttons,
would seem a bit unrealistic? I appreciate that for performance
reasons it might not be enabled my default, but I think as it is
breaking the default behaviour then it should be part of core, perhaps
on an opt-in basis?

Cheers,

SJ

On Nov 27, 2:16 pm, Fábio M. Costa <[email protected]> wrote:
> Hi raider, this is a bug ok, but its simply not possible to do in a simple
> way.
> I saw your code on the ticket, its fine (its still missing the button tag,
> but its fine), but it shouldn't be into the mootools-core.
> Can you imagine a page on a system with thousands of forms and buttons, and
> none of them will be using the value from the button?
> The code would create an event listener on each button of the forms, and
> this is not so cheap.
>
> So... this is a bug that no one found a good way of fixing it, a way that
> could ship with mootools-core.
>
> This could come with mootools-more on a Form plugin or something. That would
> be fine.
>
> Thank you for your contribution.
>
> Cheers,
>
> --
> Fábio Miranda Costa
> Solucione Sistemas
> Engenheiro de interfaces
>
> On Fri, Nov 27, 2009 at 12:00 PM, raider <[email protected]> wrote:
> > Hi Fabio,
>
> > I would class this as a bug as it differs from the expected behaviour.
> > I've submitted a ticket and posted the code I'm using to workaround
> > the issue (hasn't been tested much):
>
> >https://mootools.lighthouseapp.com/projects/2706/tickets/797-toquerys...
>
> > Cheers,
>
> > SJ
>
> > On Nov 27, 1:40 am, Fábio M. Costa <[email protected]> wrote:
> > > Hi raider,
> > > this happens because on a normal request just the clicked button is
> > > submited. So it has been chosen to not send anybutton value instead of
> > > sending all. To send the clicked button would require extra
> > > processing.
>
> > > Cheers,
>
> > > On Thursday, November 26, 2009, raider <[email protected]> wrote:
> > > > I've had a look at the mootools core and the toQueryString() method
> > > > contains the following line:
>
> > > > "if (!el.name || el.disabled || el.type == 'submit' || el.type ==
> > > > 'reset' || el.type == 'file') return;"
>
> > > > If "el.type == 'submit'" is removed the code works as expected. I'm
> > > > not sure if this is a bug or a deliberate behaviour? If it is
> > > > deliberate can anyone explain the rationale behind it and also how you
> > > > would handle a scenario where a form has multiple submit buttons with
> > > > logic based on their value?
>
> > > > Thanks,
>
> > > > SJ
>
> > > > On Nov 27, 12:41 am, raider <[email protected]> wrote:
> > > >> Hi,
>
> > > >> I've had to upgrade some mootools code from 1.2.1 to 1.2.4. Everything
> > > >> worked fine before but now the values on our submit buttons aren't
> > > >> being sent in the request. The following code is similar to what I've
> > > >> been given:
>
> > > >>http://paste.mootools.net/d3cd8526a
>
> > > >> Does anyone have any ideas as to why this is happening? Same thing in
> > > >> Firefox 3.5 and IE7.
>
> > > >> Thanks,
>
> > > >> SJ
>
> > > --
> > > --
> > > Fábio Miranda Costa
> > > Solucione Sistemas
> > > Engenheiro de interfaces

Reply via email to