I managed to resolve this by removing rico.js from my loaded
javascript.
If there are other suggestions I would love to know.
Jens
jpkolind wrote:
Dear all,
I am trying to include autocompletion on Rails (Release Candidate 1).
The following code seems to work fine within internet explorer, but
does not work at all in Firefox 2.0.1.
# View
<% form_tag :action => 'search' do %>
<%= text_field_tag :search, params[:search], :size =>
45 %>
<img id="search_spinner" src="/images/indicator.gif"
style="display:none;" />
<div class='auto_complete' id='search_auto_complete'
style="display:none;"></div>
<%= auto_complete_field :search,
:url => {:action =>
'autocomplete_search'},
:indicator =>
'search_spinner',
:update =>
'search_auto_complete',
:frequency => 0.5,
:min_chars => 3
%>
<%= submit_tag "Search" %>
<a class="grey" href="#">Advanced</a>
<% end %>
# Controller
def autocomplete_search
@search_results = VirtualMedicinalProduct.find(:all, :conditions =>
"name like '#{params[:search]}%'", :limit => 10)
render :layout => false
end
'#autocomplete_search
<ul class="autocomplete_list" >
<% @search_results.each do |l| %>
<li class="autocomplete_item" ><%= l.name %></li>
<% end %>
</ul>
Is there anything that I should be aware of when trying to implement
autocompletion in Firefox?
thank you in advance,
Jens
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby on
Rails: Spinoffs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/rubyonrails-spinoffs?hl=en
-~----------~----~----~----~------~----~------~--~---