Simon Wittber schrieb: > I'm using MochiKit.DOM.formContents to grab form variables, which I > then use in a background ajaxian POST. > > When a form has multiple buttons of the same name, for example, > 'command', the value for the button which is clicked by a user has > it's value sent in the POST request. > > The formContents function grabs all button values, therefore sending an > array of values for the 'command' name. > > Is there a MochiKit method of only picking up the value of the button > which was clicked, rather than all button values?
You have a signal connected to the buttons I presume? Just use the event target to get which button actually was pressed, and add that as a special parameter to the result of formContents. I doubt there is another solution, as the buttons won't keep any "I've been pressed" state AFAIK. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "MochiKit" group. To post to this group, send email to mochikit@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/mochikit?hl=en -~----------~----~----~----~------~----~------~--~---