Forum: Ruby on Rails remote call issues

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Befa945ac6d3bf13c4b41657e8558f85?d=identicon&s=25 Mike Dershowitz (dersh53)
on 2007-06-18 15:08
Hello:

I have a remote call i'm making in a search feature that's on a page
with another form.

 Off to the side, this remote form performs the search and returns the
results.

Problem is that if the user enters another search, the remote form
doesn't fire and no

new results are returned.

The remote form is this:

<div style="padding: 10px" align="center" valign="center">
    <% form_remote_tag :url => '/users/searchpt' do -%>
        <%= text_field_tag "search", nil, :size => 25 %>&nbsp;&nbsp;
         <%= submit_tag "Search" %>
    <% end %>
</div>
<div id="srchRes" style="padding: 10px;" align="center" valign="center">

</div>

Where the div "srchres" is where the results are placed.

And here's the render code from the controller that places the results:
  render :update do |page|
    if @users.empty?
      page.replace 'srchRes', :partial => '/users/usearchempty'
    else
      page.replace 'srchRes', :partial => '/users/usearchfriends'
    end
  end

I'm sure it's something I'm doing with a mismatch of methods.  Any help
you could

provide would be greatly appreciated.

Thanks!

Mike
This topic is locked and can not be replied to.