jQuery Autocomplete

Read more and download "jQuery Autocomplete"

This script is based on jQuery Autocomplete plugin made by PengoWorks.
It has many options and is quite easy to setup in your page.
You can pass advanced options as a JavaScript object, hashes etc.
It's easily to edit the style of the dropdown result box, there are a couple of css classes.

- You can use local arrays of data (in javascript arrays), so you don't have to use AJAX to query your server
- Limit you number of results dropdown to XX (good for limiting the results to users)
- Autofill pre-populates text box as you type
- New findValue() method can be used to programmatically determine if the value in the box is a valid option. (Useful for verifying the text entered is an existing value option.)
- Dropdown options now correctly re-position themselves on each display (which means they adjust for changing to the DOM)
- Dropdown box defaults to the width of the input field its attached to (you can manually specify a larger width as well)
- Better emulates Windows autocomplete boxes (for example: hitting delete and retyping the same box will now bring back the dropdown menu)




Web 2.0 Box Generator


Play with this script by changing the html bellow. Submit your changes by clicking on this bar. Refresh the page to reset changes.
Play with this script by changing the html above. Submit your changes by clicking on this bar. Refresh the page to reset changes.

Comment on this example

Name
Url
Comment
Captcha
 

 

1
Abe
2010-02-01 03:57:21
Can you tell me what the format of "autocomplete.php" is? I have tried
  • and "," but its not working. Thanks Abe

  • 2
    Iir
    2010-01-24 23:47:35
    does it compatible with iis 7 ??

    3
    Máy Chiếu
    2010-01-06 22:28:35
    it's really a great work. This is what i was searching for. Thanx. But I need something more, when I press enter i need to add the selected value and close the dropped box. Please help me here..... .thank you again.

    4
    Awni Obeid
    2009-12-14 23:42:37
    Thanks , this is useful Jquery

    5
    Autocompleter
    2009-12-02 03:54:41
    questo js si che tarella di brutto, non come quelle gran merdate che fa prototype!!!!!!

    6
    Dell Inspiron Charger
    2009-11-30 08:35:59
    Thanks , this is such a useful Jquey

    7
    James
    2009-11-26 15:25:29
    you may try this too.http://jamesgeraldlgayo.webng.com/dhtmlcombobox/DHTMLCombobox.htm the script is rather large though at 15kb

    8
    Kataoka
    2009-11-25 06:02:28
    someone got to do to fix the problem in IE 7?

    9
    Firma Ekle
    2009-11-16 04:52:08
    this is great for php. i m trying to use with asp.

    10
    Prakash
    2009-08-20 21:56:42
    great work :)

    11
    Gihan
    2009-06-10 05:24:40
    it's really a great work. This is what i was searching for. Thanx. But I need something more, when I press enter i need to add the selected value and close the dropped box. Please help me here..... .thank you again.

    12
    Viking
    2009-05-01 09:18:14
    one more question! I need to fire off a function when the ajax results return so that I can hide a "waiting" image... how do I do that?

    13
    Viking
    2009-05-01 09:16:00
    I am new to jquery so please forgive me if this is a silly question! I have a text field called "bin" where users type and the autocomplete fires off. However, there is a dropdown that has a value that is used in the backend SQL for the autocomplete. My problem is that I am trying to pass the value of this drop down when the autocomplete fires off... extraParams:{myLocId1:form1.ajaxloc.value}. but this value is always the same. It doesnt change when I change the dropdown. I have also tried passing it in the url portion of autocomplete but same problem. here is my code: $("#bin").autocomplete( "myServlet?module=inv&mode=binlookup&page=inv_stock_qty&page_type=content&", { delay:10, minChars:2, matchSubset:1, maxItemsToShow:12, matchContains:1, extraParams:{myLocId1:form1.ajaxloc.value}, cacheLength:1, onItemSelect:selectItem, onFindValue:findValue, autoFill:true } ); any ideas?

    14
    Ertert
    2009-03-03 02:48:05
    retert

    15
    PHPgeek
    2009-02-28 01:38:17
    cool site, i like it

    16
    Zahid
    2009-02-26 01:09:52
    it's really cool I will use in my own projects

    17
    Seema Kanojia
    2009-02-11 03:06:23
    good code.helpful

    18
    Ravindra Patidar
    2008-12-16 03:35:03
    It is working well at firefox but in IE7 i got the error message "Internet explorer cannot open site .." "operation aborted". Can you please help me to resolve this problem?

    19
    Karthick
    2008-11-05 08:30:48
    i need this jquery.js can any one help me

    20
    Seb
    2008-10-07 12:19:49
    The plugin refuse to load in IE7. Any fix ?

    21
    Ken Mickles
    2008-09-25 16:38:32
    If you get operation aborted in IE, wrap your autocomplete call in $(document).ready(). Should probably fix it.

    22
    Mike
    2008-09-20 15:11:04
    Doesn't work in IE for me.. i got the message "Internet explorer cannot open site .." "operation aborted"

    23
    Aman
    2008-09-08 21:34:58
    it is not logic of the writter , got from the JQuery website and paste here as well. it has many issues and bugs and it nevere looks good in MVC pages.

    24
    Aman
    2008-09-08 21:32:20
    Can any one tell me , why it throws an error when using this in MVC.

    25
    Chinuku
    2008-08-17 22:59:15
    Its really very Nice One

    26
    Jbjigar
    2008-07-23 05:20:46
    Very Nice. Thanks.....

    27
    Adam Cox
    2008-04-17 20:11:22
    Very nice article! I was going to use AJAX to get the data from the DB on the server, but this might be an easier approach.

    28
    Kevin
    2008-03-21 11:50:31
    this is really cool... i use script.aculo.us

    29
    Coto
    2008-03-19 07:38:44
    This is a bug!!! function requestData(q) { if (!options.matchCase) q = q.toLowerCase(); var data = options.cacheLength ? loadFromCache(q) : null; // recieve the cached data if (data && data != "") {

    30
    Viru
    2008-03-06 08:56:34
    thanks for the demo. very useful

    31
    Frank
    2007-11-04 07:58:43
    ver ynice

    32
    Miroslav
    2007-10-03 23:37:52
    Nice article :)

    33
    John
    2007-06-15 00:36:31
    Useful implementation of jQuery plugin. There are so many ways to add this to your html