adding additional jQuery autocomplete functionality

adding additional jQuery autocomplete functionality

Hello to everybody,

I'm very new to jQuery and jQuery's plugins. I'm currently working on using the autocomplete plugin. So far it works great but I would like to add additional functionality. What I mean by that is I would like to have other elements in the DOM change whenever a different item in the dropdown list is selected.

For example:

I have my server side code returning a JSON object with several values like the following:

DeviceID, DeviceName, DeviceGroup, DeviceCategory, DeviceClient ...  etc. etc.

I would like the autocomplete plugin to populate the dropdownlist with, lets say, the DeviceName but populate other DOM objects with the other values, like DeviceGroup, DeviceCategory etc etc.

As I have mentioned, I'm a total beginner to jQuery and its plugin system. Reading through some posts online and several books I have on jQuery, I'm willing to bet that it can be done by adding / changing some of the autocomplete plugin code via the

$.fn.extend({...

result: ...

},

But since I'm so new to this, I'm having a very hard time understanding exactly what is happening within the code. I would greatly appreciate if somebody could point me in the right direction.

Thanks to all in advance!

William