I''m trying to submit an ajax form via an onchange method in a select menu, but I can''t seem to do it. The problem holding me up, is that I can''t figure out how to set the ID of the form when using a form_remote_tag (I need to use the ID of the form as the forms on the page are variable, so I can''t reference it in the form array). Setting :id => ''thisForm'' is wholly ignored, as is trying it in a set of curly brackets after the other values (ala, the html_options field for other form helpers). start_form_tag seems to be similarly limited. I''ve gotta be missing something, but I''ve searched both the api my rails beta2 pdf to no avail. Any advice / workarounds would be greatly appreciated. --Ethan _______________________________________________ Rails mailing list Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails
On Fri, Jun 10, 2005, E wrote:> I''m trying to submit an ajax form via an onchange method in a select > menu, but I can''t seem to do it. > > The problem holding me up, is that I can''t figure out how to set the > ID of the form when using a form_remote_tag (I need to use the ID of > the form as the forms on the page are variable, so I can''t reference > it in the form array). Setting :id => ''thisForm'' is wholly ignored, > as is trying it in a set of curly brackets after the other values > (ala, the html_options field for other form helpers). start_form_tag > seems to be similarly limited.<%= form_remote_tag :update => ''updateDiv'', :url => { :action => ''some_action'' }, :html => { :name => ''formName'' } %> I don''t remember where I found that, probably asking in IRC. I don''t think it''s documented, but it worked for me! Ben
Possibly Parallel Threads
- Rail3: UJS submit after client-side validation
- List Box Issue - Should be easy, but nor for me!
- syntax for specifying :html fallback on form_remote_tag
- Problem with auto-submitting AJAX form
- Text field not being submitted via form_remote_tag; works via form_tag