Again, AJAX forms with multiple submit buttons

Hi,

I'm trying to use an AJAX form with multiple submit buttons and am getting the same result whatever button I click.

I've seen this discussion, but it doesn't help me. The patch to ActionView::Base only works in Firefox but not in IE (at least for me). And, I've got more than one button, so disabling the other one doesn't do the trick.

Then, I've found this bug, and it's closed, with a patch: http://dev.rubyonrails.org/ticket/5031 But, for the life of me, I can't find where to apply this patch.

Any recent fix for this problem?

Thanks, Amir

helzer wrote:

I'm trying to use an AJAX form with multiple submit buttons and am getting the same result whatever button I click.

Forms cannot be nested. It's in the W3C spec. OTOH, you can have as many forms on the page as you want. You don't need to worry about disabling submit buttons. Worry about how you're going to get information that's been entered into 'forms' that haven't been submittted. Ajax is a different paradigm.

HTH, Bill

Hi Bill,

The case is more simple. What I have is a single form with a few submit buttons. The input fields are check-boxes and the submit buttons are the required action.

It appears that there's a long-awaiting Rails bug regarding getting the submit button information from AJAX forms. I was wondering if there's been any change to this bug from the last time is was discussed here about a year ago: http://groups.google.com/group/rubyonrails-talk/browse_thread/thread/dad559c19fc272b5/859652d68af553d0

It should be a frequent thing in many applications, so I'm hoping there's a good fix for this problem.

Amir