Jesper Rønn-Jensen
2008-Apr-29 14:32 UTC
auto_completer how to make a summary line not selectable
i''m making an autocomplete field, where the autocompleter selects from roughly 10,000 items in a table. Of course i use LIMIT to limit the resultset to about 7 items. In the bottom of the autocomplete div, I want to add a total count line. The problem is that if I add it to the UL, the li with the total sum is selectable.... not good. I tried to add <li class="informal">Total found: 52</li> But that li is still selectable. Is there a way of adding this information or is there some syntactic sugar I can make use of already? THanks for your replies :) /Jesper Rønn-Jensen Blog: www.justaddwater.dk --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Roger Pack
2008-Apr-29 17:13 UTC
Re: auto_completer how to make a summary line not selectable
you could make it a ul group header. On Tue, Apr 29, 2008 at 8:32 AM, Jesper Rønn-Jensen <jesperrr@gmail.com> wrote:> > i'm making an autocomplete field, where the autocompleter selects from > roughly 10,000 items in a table. Of course i use LIMIT to limit the > resultset to about 7 items. > > In the bottom of the autocomplete div, I want to add a total count > line. The problem is that if I add it to the UL, the li with the total > sum is selectable.... not good. > > I tried to add <li class="informal">Total found: 52</li> > > But that li is still selectable. > > Is there a way of adding this information or is there some syntactic > sugar I can make use of already? > > > THanks for your replies :) > > /Jesper Rønn-Jensen > Blog: www.justaddwater.dk > > >--~--~---------~--~----~------------~-------~--~----~ 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-unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Xavier Noria
2008-Apr-29 19:47 UTC
Re: auto_completer how to make a summary line not selectable
On Apr 29, 2008, at 16:32 , Jesper Rønn-Jensen wrote:> i''m making an autocomplete field, where the autocompleter selects from > roughly 10,000 items in a table. Of course i use LIMIT to limit the > resultset to about 7 items. > > In the bottom of the autocomplete div, I want to add a total count > line. The problem is that if I add it to the UL, the li with the total > sum is selectable.... not good. > > I tried to add <li class="informal">Total found: 52</li> > > But that li is still selectable. > > Is there a way of adding this information or is there some syntactic > sugar I can make use of already?Hi Jesper, doing some dirty trials looks like you can put stuff _after_ the list like this: <ul> <li>Foo</li> <li>Bar</li> </ul> <div style="width: 100%;">Total: 2</div> The content of that extra DIV is not selectable, with the help of some good CSS it may look nice. -- fxn --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---