1

Re: Autocompletion

I've just been looking at the plethora of jQuery autocompletion libraries - there do seem to be a lot of them! I'm currently leaning towards http://bassistance.de/jquery-plugins/jquery-plugin-autocomplete/ to standardise on for the core module, but this is going mostly on reading the lists of features, so if anybody has experience of using any of them, it would be useful to have your advice on which you found the best.

Critically, we want one that supports separate id/values and probably JSON for output from the services module.

2

Re: Autocompletion

Just in case it helps, the services module can easily output data as a set of <li> elements, which is a fairly common way of handling AJAX responses for auto-complete. That might open up some other options.

John van Breda
Biodiverse IT

3

Re: Autocompletion

Hi,
Autocomplete needs max speed. This could be a problem. Therefore most autocomplete functions that i have seen use json. It's lightweight. All html code is produced directly on the browser side and not on the server side.

4

Re: Autocompletion

From a user's perspective, I really like the "Quicksilver Style" livesearch for jQuery. Have a look at the original version, which was implemented in Prototype. Then have a look at a refactoring done by John Resig.

That style of partial name matching is really useful. To find "European Otter" you could, for instance, type "eot", or "otter", or "euot", or "eurot"... you get the idea. It's useful as a way of enabling the user to create their own ad-hoc species coding system.

Charles Roper
Digital Development Manager | Field Studies Council
http://www.field-studies-council.org | https://twitter.com/charlesroper | https://twitter.com/fsc_digital

5

Re: Autocompletion

BTW, the Quicksilver style string ranking algorithm can be found here:

http://orderedlist.com/demos/quicksilverjs/javascripts/quicksilver.js

Charles Roper
Digital Development Manager | Field Studies Council
http://www.field-studies-council.org | https://twitter.com/charlesroper | https://twitter.com/fsc_digital

6

Re: Autocompletion

That looks quite nice. With regards to this project, the majority of the searching is going to be done on the server side, so if we were to use something like this we'd have to work out a reasonably cost-effective way of evaluating the terms in the database in this way - I guess this would mean coding a function into the database. We should be able to do this with any client-side code, because we just return the right list from the services.

7

Re: Autocompletion

The data services that will provide access to the db from AJAX controls are now done, although without proper authentication yet. For example, to retrieve json for all terms containing “quad” from list number 2, call

http://www.site.com/index.php/services/data/termlists_term?termlist_id=2&term=quad&orderby=term&limit=10&mode=json

There's some documentation of the RESTful data services that allow you to pull data out of Indicia on the Wiki at http://code.google.com/p/indicia/wiki/DataServices.

John van Breda
Biodiverse IT