I was evaluating all the available JQuery plugins to get a Facebook-like contact autocompletion functionality, and deemed the one by Ian Tearle to be the most complete available. However, most complete does not mean fully done, or bug free, and I learned this the hard way doing an initial implementation on a project I’m doing at work.
Spending all day with the lovely Firebug debugger and testing in both Firefox 3 and IE7, I can say I have it working the way I need it to. My version fixes the following issues:
- Not all results that are returned are displayed
- Duplicate contacts can be inserted
- When searching, the user is not notified that a search is being performed
- The ID was being displayed with the search results, this has now been removed
There is still one lingering issue: the values stored in the hidden field… the plugin needs the trailing comma at the end of the values in order to properly perform backspace deletion. It’s really a minor issue as long as you remember in your code that parses the value, that when exploding the commas, you’ll have to ignore the final array row as it will be blank or null.
I do not provide any support for my modified plugin, but feel free to leave comments if you hit bugs, and if I have time, I will fix them. I’m also hoping Ian will accept my changes so that I can just do a link to his page for the fix.
Edit: Yay, Ian accepted the changes, and they are now updated on the JQuery Plugin project page! I’ve updated my download link to point to the page.