Show a loading image while a new view is rendered

<%= form_remote_tag :url => {:action => 'search'},
       :complete => "new Effect.Appear('div_list')",
       :before => %(Element.show('spinner')),
       :update => 'div_list',
       :success => %(Element.hide('spinner')) %>
<label for="name">Name:</label>
<%= text_field_tag 'name'%>
<%= submit_tag "Search" %>
<%= image_tag 'spinner.gif', :id => 'spinner', :style => 'display:
none' %>
<%= end_form_tag %>

<div id="div_list"></div>

And if you want to find a spinner, generate one with http://www.ajaxload.info/ for example.

Best regards

Peter De Berdt