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?
Wtf is this about? 2009/10/9, Me <chabgood-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>:> > 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
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 <mikezter-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > Wtf is this about? > > 2009/10/9, Me <chabgood-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>: > > > > 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Anybody? this behaves like the select statement is not even there for some reason. On Oct 9, 3:39 pm, Chris Habgood <chabg...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> 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...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > Wtf is this about? > > > 2009/10/9, Me <chabg...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>: > > > > 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 > >