Justin/Frederick - Thanks, that did the trick. Here's my updated code: <% form_remote_tag( :url => {:controller => 'store', :action => 'finalize_order', :location_id => @location.id}, :before => "finalizing();") do %> ... <% end %>
That generates <form action="/some/path" method="post" onsubmit="finalize(); new Ajax.Request('/ some/path', {asynchronous:true, evalScripts:true, parameters:Form.serialize(this)}); return false;"> which is exactly what I was after. On Jun 26, 2:46 pm, "Justin Perkins" <[EMAIL PROTECTED]> wrote: > On Thu, Jun 26, 2008 at 1:53 PM, Chris S <[EMAIL PROTECTED]> wrote: > > finalizing() basically changes the button text and disables the button > > while the form is submitting. Works as expected in FF, but in Opera > > If you disable a submit button before the form onsubmit event actually > fires, the form will not submit in IE and apparently, Opera. You need > to disable the submit button *after* the form onsubmit event has > occurred. This is typically achieved by adding an onStart() handler to > your Ajax request. > > -justin --~--~---------~--~----~------------~-------~--~----~ 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@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---