autocomplete with extra data

I have the autocompleter using the :select => 'NAME' option.

This is the partial:

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

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?

Wtf is this about?

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.

    <% @dt.each do |user| -%>

  • <%=h user[0] %>

    <%= user[0] %>

    <%= user[1] %>

  • <% end %>

Anybody? this behaves like the select statement is not even there for
some reason.