Forum: Ruby on Rails submit a form from RJS

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
Kad K. (Guest)
on 2007-05-03 11:33
I am submitting an Ajax form with  form_remote_tag

in my view
<% form_remote_tag( :url =>{:action => 'list'}, :html => {:id =>
'prop_search_form',  :name => "prop_search_form"} ) do %>
<% end %>

in my controller I test the request, to display a partial
def list
     if request.xhr?
      render :partial => 'result_area', :layout => false

now on a specific condition, I need to modify some form values  (hidden
and radio), then I would like to submit the form...  if a use page <<
"$('prop_search_form').submit(), I don't have an ajax request ... and if
I try the following, I don't catch the form parameters....   what could
be the solution ?

def show_my_posts
    render :update do |page|
      page << "$('current_user_posts').value = '1'"
      page << "$('pt0').checked = 'true'"
      page.redirect_to :action => 'list', :with =>
This topic is locked and can not be replied to.