# Auto\_complete with no of occurance

**URL:** <https://www.ruby-forum.com/t/auto-complete-with-no-of-occurance/155376>\
**Category:** Rails\
**Created:** [December 11, 2008, 5:53am UTC](https://www.ruby-forum.com/t/auto-complete-with-no-of-occurance/155376 "2008-12-11T05:53:26Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![tuhin\_cse99](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/a6a055/32.png) [@tuhin\_cse99](https://www.ruby-forum.com/u/tuhin_cse99)\
**Post date:** [December 11, 2008, 5:53am UTC](https://www.ruby-forum.com/t/auto-complete-with-no-of-occurance/155376/1 "2008-12-11T05:53:26Z")

</div>

Hi,  
I have implemented auto complete text box by using auto\_complete  
plugins in rails 2 application.  
Can I show the number of occurence of the text those display in the  
list drived by auto\_complete pugin?  
just like google.  
as example if I type “a” then it will show the list starting by “a”  
with the  
number of those text presence in the field of DB table.  
Any idea will be great appreciable.

thanks in advace.

---

<div class="post-metadata">

**Author:** ![tuhin\_cse99](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/a6a055/32.png) [@tuhin\_cse99](https://www.ruby-forum.com/u/tuhin_cse99)\
**Post date:** [December 11, 2008, 6:54am UTC](https://www.ruby-forum.com/t/auto-complete-with-no-of-occurance/155376/2 "2008-12-11T06:54:09Z")

</div>

Ruhul A. wrote:

> Hi,  
> I have implemented auto complete text box by using auto\_complete  
> plugins in rails 2 application.  
> Can I show the number of occurence of the text those display in the  
> list drived by auto\_complete pugin?  
> just like google.  
> as example if I type “a” then it will show the list starting by “a”  
> with the  
> number of those text presence in the field of DB table.  
> Any idea will be great appreciable.
> 
> thanks in advace.

use autocomplete js

---

<div class="post-metadata">

**Author:** ![tuhin\_cse99](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/a6a055/32.png) [@tuhin\_cse99](https://www.ruby-forum.com/u/tuhin_cse99)\
**Post date:** [December 11, 2008, 7:55am UTC](https://www.ruby-forum.com/t/auto-complete-with-no-of-occurance/155376/3 "2008-12-11T07:55:56Z")

</div>

Nike M. wrote:

> use autocomplete js

Hi Mike,  
Thanks for your reply. I have googled for the  
autocomplete.js.But the  
resultant items have no functionality that I am searching for( except  
Yahoo! UI Library\>autocomplete\>AutoComplete.js, I haven’t tried it).

I have already used auto\_complete plugin for auto complete list drive.  
But it do not show the number how many times the text  
is present in DB table.  
as example…  
while type “a”  
It should show:  
apple 10  
angel 5  
axe 30  
Can I make clear? Please have a look in the attachment.Sorry for my  
poor description.  
Please…  
Thanks in advance.  
Amin

---

<div class="post-metadata">

**Author:** ![tuhin\_cse99](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/a6a055/32.png) [@tuhin\_cse99](https://www.ruby-forum.com/u/tuhin_cse99)\
**Post date:** [December 12, 2008, 5:57am UTC](https://www.ruby-forum.com/t/auto-complete-with-no-of-occurance/155376/4 "2008-12-12T05:57:55Z")

</div>

just follow this for auto complete

> **[Prototype UI autocomplete (Ajax)
 Using Ruby on Rails -II](http://www.genlinux.org/2008/07/prototype-ui-autocomplete-ajax-using.html)**
>
> This is my IInd article on Prototype UI autocomplete.The main source of the article is from Prototype-UI . Download this tutorial In my pr...
