jQuery Functions/callbacks

jQuery Functions/callbacks

I have made a control (in .NET) which uses a treeview, and binds a click event to each a tag, and when it is clicked a hidden asp.net control has it's value set with the ID of the item selected. This is working very well, and is a self contained control.

Now i want to update another control based on the selection of this, and also to update the control via ajax with a dependent set of items based on that initial selection. (think cars and models example, i pick a car and then want to get the models for it)

My first control needs to be able to raise an event, or takes a JS function such that when you click the first control (the car) then as well as setting the hidden field, it raises the event/calls the function.

How would be the best way to achieve this? The first control must remain ignorant of the second, so it would only call a method/raise an event if a suitable delegate function/event was given to it.

Hopefully that makes sense. Any ideas?