1 <div id="search_results">
2 <table class="search_results_title" width="100%">
4 <td align="left">Search Results</td>
5 <td align="right"><a href="javascript:closeSearchResults()">Close</a></td>
8 <div id="search_results_content">
12 <script type="text/javascript">
14 function openSearchResults() {
15 $("search_results").style.display = "block";
16 $("search_results_content").innerHTML = "<p class='search_results_entry'>Searching...</p>";
20 function closeSearchResults() {
21 $("search_results").style.display = "none";
25 <% if params[:query] %>
26 <%= remote_function(:update => :search_results_content,
27 :loading => "openSearchResults()",
28 :url => { :controller => :geocoder, :action => :search, :query => params[:query] }) %>
33 <% content_for "optionals" do %>
34 <div class="optionalbox">
35 <span class="oboxheader">Search</span>
36 <% form_remote_tag(:update => :search_results_content,
37 :loading => "openSearchResults()",
38 :url => { :controller => :geocoder, :action => :search }) do %>
39 <%= text_field_tag :query, params[:query] %>
41 <p class="search_help">
42 examples: 'Alkmaar', 'Regent Street, Cambridge', 'CB2 5AQ',
43 or 'post offices near Lünen'
44 <a href="http://wiki.openstreetmap.org/index.php/Search_Help">more examples...</a>