Ok here is the full code then.
<%= text_field_with_auto_complete :friend, :name,{:select => "NAME"},
:after_update_element => "function(element,value){" + remote_function(:url
=> { :controller => 'followerranking', :action => :ajax_add_friend },  :with
=> "'friend[name]=' + element.value") + "}" %>

Partial for autocomplete drop down.  The SELECT above is supposed to pick
the element with the class specified.  It is selected everything not only
just the div witht he class name.

<ul class="auto_complete">
<% @dt.each do |user| -%>
<li>
<%=h user[0] %>
<div id="NAME" class="NAME" style="display: none;">
<%= user[0] %>
</div>
<div id="screen_name" style="display: none;">
<%= user[1] %>
</div>
</li>
<% end %>
</ul>

On Fri, Oct 9, 2009 at 3:31 PM, mike <mikez...@gmail.com> wrote:

>
> Wtf is this about?
>
> 2009/10/9, Me <chabg...@gmail.com>:
> >
> > I have the autocompleter using the :select => 'NAME' option.
> >
> > This is the partial:
> >
> > <ul class="auto_complete">
> > <% @dt.each do |user| -%>
> > <li>
> > <%=h user[0] %>
> > <div id="NAME" class="NAME" style="display: none;">
> > <%= user[0] %>
> > </div>
> > <div style="display: none;">
> > <%= user[1] %>
> > </div>
> > </li>
> > <% end %>
> > </ul>
> >
> > I am getting all of the data when I select the name.  I have done this
> > before but I am not sure why it is retrieving all of the data as the
> > select option is supposed to only use the data in the class
> > specified.  any ideas?
> > >
> >
>
> --
> Von meinen Mobilgerät aus gesendet
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to