This is the concrete situation for which I cannot find a solution:
I have several 'select' elements which contain information like: country, state, town. <select size="1" name="country">[...]</select> <select size="1" name="state">[...]</select> <select size="1" name="town">[...]</select> When a country is selected, I populate all the states of the country in the state 'select' by an ajax request, then when a state is selected, I populate all the towns of the selected state in the town 'select' A user can also select a town by typing in an input field with auto-completion. If he chooses a town among the auto-completion item list, I want to select automatically the appropiate country/state/town in the above select elements. (When he chooses an item in the autocompletion list, I have the country, state and town) function selectTown(country, state, town) { $('#country').val(country); $('#country').change(); // <- this will load the states in the select // once the country has been selected // and select element containing states has been populated, then do // $('#state').val(state); // $('#state').change(); } Richard D. Worth-2 wrote: > > On Sat, Sep 27, 2008 at 3:35 AM, debussy007 <[EMAIL PROTECTED]> wrote: > >> >> >> Hi, >> >> For a lot of asynschronous calls, like the effects, jQuery provides >> completion callbacks which are very useful. >> Unfortunately it doesn't provide completion callbacks for events. >> >> How am I able to know when an event has been completely processed ? >> Once a specific event has been processed, I would like to perform other >> instructions. > > > Can you describe what you mean by "when an event has been completely > processed"? Maybe provide a concrete example? Events occur or fire, they > don't process. So you can be notified when events occur/are triggered > using: > > $("#myEl").bind("keydown", function() { ... }) > //or > $("#myEl").keydown(function() { ... }) > > and same for any events (click, mousedown, mousemove, mouseup, change, > etc). > At what other time would you want to be notified? keyup and keypress are > separate events (to complete this example). > > - Richard > > -- View this message in context: http://www.nabble.com/Completion-callback-after-events-tp19700454s27240p19702806.html Sent from the jQuery General Discussion mailing list archive at Nabble.com.