tags:

views:

28

answers:

1

I have recently been using jQuery for light DOM manipulation for my web application and it works great. I've now been requested to add an auto complete to a data field that the user has to fill in. The data in this field is from a very limited set of data but the user can enter that data in its full format, e.g. product name, and code format, e.g. article id. So for instance, "Panasonic DVD Player" and PAN-DV-24 are equivalent.

The data set is really small, maybe 300 rows, so I thought about using jQuery to implement auto complete that searches from a set of data where full format and code format are defined. I've looked around are there seems to be a lot of uncertainty about the state of autocomplete plugins for jQuery and I'm not sure how you would implement an auto complete that treats two columns of data as "synonyms".

A: 

The data issue should be behind your service layer. You pass in the query term via jquery to your web service. The web service searches over your two or three or four lists of data and returns a list of appropriate terms. But the logic as to how the search is implemented should be hidden from the client! From there you can use DHTML to display the list of found words.

Andrew Siemer