Reputation: 221
I would like to make my search user friendly by using jquery or ajax. I'm using searchlogic for my query and a basic search submission.
My search form is the same page as the result. So If I submit the search, the page will reload and show the result under the form.
Search Form:
<% form_tag search_path do %>
<% text_field_tag :name %>
<% end %>
<%= result %>
Upvotes: 1
Views: 141
Reputation: 15981
Try this way.
<% form_remote_tag :url => { :action => "search"}, :update => "result" do %>
<% text_field_tag :name %>
<% end %>
<div id="result"></div>
Upvotes: 1