% replacement_function = update_element_function("products", :action => :update) do %>
Product 1
Product 2
<% end %> <%= javascript_tag(replacement_function) %> <% update_element_function("status", :action => :update, :binding => binding) do %> You bought something! <% end %>