# Auto\_completer how to make a summary line not selectable

**URL:** <https://www.ruby-forum.com/t/auto-completer-how-to-make-a-summary-line-not-selectable/136170>\
**Category:** Rails\
**Created:** [April 29, 2008, 4:33pm UTC](https://www.ruby-forum.com/t/auto-completer-how-to-make-a-summary-line-not-selectable/136170 "2008-04-29T16:33:48Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![jesperronn](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/b5a626/32.png) [@jesperronn](https://www.ruby-forum.com/u/jesperronn)\
**Post date:** [April 29, 2008, 4:33pm UTC](https://www.ruby-forum.com/t/auto-completer-how-to-make-a-summary-line-not-selectable/136170/1 "2008-04-29T16:33:48Z")

</div>

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

- Total found: 52

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

---

<div class="post-metadata">

**Author:** ![jesperronn](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/b5a626/32.png) [@jesperronn](https://www.ruby-forum.com/u/jesperronn)\
**Post date:** [April 29, 2008, 7:14pm UTC](https://www.ruby-forum.com/t/auto-completer-how-to-make-a-summary-line-not-selectable/136170/2 "2008-04-29T19:14:58Z")

</div>

you could make it a ul group header.

---

<div class="post-metadata">

**Author:** ![jesperronn](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/b5a626/32.png) [@jesperronn](https://www.ruby-forum.com/u/jesperronn)\
**Post date:** [April 29, 2008, 9:48pm UTC](https://www.ruby-forum.com/t/auto-completer-how-to-make-a-summary-line-not-selectable/136170/3 "2008-04-29T21:48:50Z")

</div>

On Apr 29, 2008, at 16:32 , Jesper Rønn-Jensen wrote:

> 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
