In case anyone comes across this issue I thought it worth reporting my findings since it is an artifact of using Scriptaculous and Ajax in Cake.
> I have some strange behavior in an ajax form and am wondering if it > could be cake related? > > Cake version: 1.1.8.3544 > > Regardless of which submit button is clicked > $this->params['form']['submit'] always contains the value from the last > button in the form. This is caused by the serialisation of the form content by Scriptaculous. Unlike a standard form post it does not detect the button that was clicked, but just serialises all of the <input> tags. This means that multiple submit buttons are overwritten and you just end up with the last one in the form. With hindsight it is logical. Pity I wasted Sunday night on it. > This doesn't happen with other versions of Cake that I have used. It > also doesn't happen if I use a regular submit rather than ajax. I was wrong here. I reviewed the other application and found that I was not trying to distinguish multiple buttons via Ajax requests, but doing it on the client side with Javascript. > This happens with both IE and Firefox. Understandable since it is Scriptaculous that is responsible. Regards, Langdon --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~----------~----~----~----~------~----~------~--~---
