meefster-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org
2010-Oct-15 14:11 UTC
Problem on Firefox and :disable_with on remote forms (ajax) when using jQuery
Hi, I''m not sure if I found a bug, or if I''m doing something wrong. Here is what happens: We''re using Rails 3.0.1 with jQuery instead of Prototype. When we create a simple ajax form (using :remote => true) and use :disable_with on the submit button, it works. As a result of the Ajax call we use Javascript to replace the form by another partial. Because page.replace does not work with jQuery, we''re doing this: === response.js.erb ===============$(''#container_to_be_replaced'').html(''<%= escape_javascript render :partial => ''form'' %>''); ============================= This works pretty well, but if I''m using Firefox, and I reload the page (e.g. by pressing Command-R), the form will never be sent again. This only happens when we use the ":disable_with" option for the submit button. So I guess it must have something to do with the jQuery version of rails.js. I''ve prepared a short sample project: git://github.com/easychris/testcase_disable_with_bug.git Did I made a mistake, or do you think it''s a bug and I should open a ticket? Best Chris -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.