New component (auto_complete) in prototype UI
February 22nd, 2008
I have added a new component in Prototype UI after having seeing this auto_complete from InteRiders
First of all, I want to thanks those guys and also Guillermo Rauch for the first version based on mootools.
For a customer, I needed an component based on prototype butn with content set by Ajax request and with some other features. I decided to port this component in prototype UI.
The main advantage of being part of Prototype UI is I can use some great functionnalities of this frame work without adding complicated code like:- Shadowing system for a better look and feel and better user experience. It does not look like a “flat” div under the input field
- IFrameShim to avoid the bug of having select box over the completion
- packr version
The component is fully unobtrusive, all HTML code needed for displaying completion is built by the script. As always, I try to make component skinnable. You can see below a “facebook” style as the original version and a more Apple like look and feel.
Facebook style

Apple style
It’s only available in trunk version right now but it will be included in the next release candidate planned for March.
If you really want to use it :), you can dowload a zip file with functionnal tests included.
I will add some features like serialization or a way to hand automatically hidden fields for an easier submit process. I have also to work on unit tests and documentation before the release.
If you want to try it, check those two functional tests: non ajax and ajax fill (be aware that it’s faking an ajax request, some browser do not like it :)).
PS: I will be away from my computer for a week, so I won’t reply to any comments before March.