Read RSS Reed
search...

Autocompleter using XAJAX

February 6th, 2009

rarecore autocompleter It is often helpful to use an autocompleter on your website. Perhaps in search dialogs? An example is google on an extra search page.

I tested some free tools, but I had always the problem that there was no possibility to use two or more autocompleter on one page and to organize the dependency. E.g. insert a name of a country in the first textbox and in the second textbox insert a name of a city. On the city textbox you only want to see cities belonging to the inserted country – no other cities.

This problem was the reason why I developed my own autocompleter using xajax. This framework allows me to respond on the key events and select the values from the database. I could write my own functions and use any parameters.

I generated a textbox with a hidden div below which is calling a function on the onkeyup event by using xajax. In this test I mark the searched string with a span and on CSS I colored it blue. Additional I added a mouseover using CSS.

Demo *** NEW VERSION ***

http://blog.rarecore.eu/wp-content/plugins/downloads-manager/img/icons/default.gif download: Autocompleter v2 (119.55KB)
added: 08/11/2009
clicks: 1419

That’s all!


Tags: , , , , , ,



12 Responses to “Autocompleter using XAJAX”

  1. MrDrHamburg Says:

    nice ac system !

  2. Rayasa Says:

    Your work is quite amazing!

  3. _joe_ Says:

    Pushing the “down”-button to select an entry breaks it on Opera (displays “Schwedeneck” – don’t really know why).

  4. Exi Says:

    I tested it with Opera 9.51 and it works

  5. Mike Says:

    Oeehhh!!

    You deserve a kiss on the buttcheek! ;)
    Very nice system!

    Best free autocomplete system on the net.

  6. ozzi Says:

    Wie kann ich dem Array eigene Werte wie z.B MySQL Ergebnisse zuweisen?
    Wenn ich das Ergebniss-Array einfach übertrage funktioniert es nicht, bitte um hilfe :).

  7. wow power leveling Says:

    A wonderful article…. In my life, I have never seen a man be so selfless in helping others around him to get along and get working. I feel good that there are people like you too. Thanks for this great weblog of yours. Its surely going to get me to go to higher places!

  8. Dennis (cephei@weareone) Says:

    I didnt test it but it looks like a good AC. Exi, why dont you use the http://script.aculo.us/ (prototype) Framework? It’s an amazing good framework for almost everything, even AutoCompleter. The only problem is that they only give you the JS part, not the Server side (PHP) side.

  9. Gerald Says:

    Under which license is Autocompleter published?

  10. Exi Says:

    @Gerald:

    GPL (General Public License)

  11. Gerald Says:

    Okay, many thanks :-)

  12. wow power leveling Says:

    what’s your name? bmx

Leave a Reply