Ok, pretty simple question, I have working an AJAX method, what it does is that it searches in the database for specific information with a query. I can see in the Console that
In your respond_to block put format.js above format.html.
Make sure you have index.js.erb in your view folder for the controller. This index.js.erb(comes from the action name) should have a jQuery statement like the following if you're using rails 3.1+:
$('#DOMelementToPlaceContent').html(<%= escape_javascript(render :partial => "partial/location") %>);
This will replace the content of the DOM element with ID DOMelementToPlaceContent with the content in the specified partial.
Also, you should think about moving the logic for your search to a search action in the same controller in which case you'll need a search.js.erb file in the view folder for the controller.