Forum: Ruby on Rails remote call issues

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.
Mike D. (Guest)
on 2007-06-18 17:08

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

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 id="srchRes" style="padding: 10px;" align="center" valign="center">


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'
      page.replace 'srchRes', :partial => '/users/usearchfriends'

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

provide would be greatly appreciated.


This topic is locked and can not be replied to.