jascha wrote:> Hi there,
>
> I am observing a form with the event "submit" on my website. I
stop
> the event and make a Ajax request, where I send
> form.serializeElements() as post parameters.
>
> Now my Problem is, that I dont know wich submit buttons fired that
> event. Yes, I could make an additional event listener for that, but I
> dont want to do that.
>
> In Google I found this page (http://andrewu.co.uk/webtech/comment/?
> easy_ajax_with_prototype), where is written "...the form onsubmit
> handler already knows the node that fired the submit event.."
>
> Firebug is telling me:
> - srcElement is not set
> - target is routed to the parent form by prototype
> - originalTarget is routed to the parent form by prototype
> - explicitOriginalTarget is what I need, but taht only works for
> Firefox
> - activeElement works too, but thats only Internet Explorer
>
> I still havent found a solution for Safari.
>
>
> But I still havent found, where this is meant to be.
>
> Maybe somebody can help me?
It''s a bug in how Prototype serialises forms - it should only include
successful controls, which means that if you have multiple submit
buttons and you give each a different name and value, the serialised
form should only include the button that was clicked. Prototype
erroneously includes all the buttons with names.
If you want to get any attention, submit a bug report.
--
Rob
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Spinoffs" group.
To post to this group, send email to
rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-spinoffs?hl=en
-~----------~----~----~----~------~----~------~--~---