Hi,
I am havving issues with dropdown change event functionality. I am using YUI 2 in code and I dont get current value in "change" event handler of dropdown. I will try to add code.
function loadValues is called with certain input which is used to determine what values show up in dropdown list. Inside this method, there is event handler for "change" event, which also needs this value as input and perform some logic.

var loadValues = function(inputValue) {
// Some logic to use inputValue and populate dropdown list having Id of "DomId"
hookupHandler(inputValue);
}

var hookupHandler = function(inputValue) {
if(!Event.getListeners('DomId', 'change')) {
Event.addListener('DomId', 'change', function() {
alert(inputValue);
});
}
}

When I call loadValues(6), dropdown gets populated with certain values, change event gets hooked.
Next I call loadValues(2), dropdown gets repopulated with certain values and change event handler is already hooked. However now I change selection in dropdown, change event handler is fired and alerts the value 6 which was the previous value of inputValue. Since the most recent value of inputValue is 2, changing selected value in dropdown should alert the new value 2 and not old value 6.

Please suggest, I have been trying for 2 days now and cannot figure this out. I expect most recent value to show up (2 in this case).

thankful for help in advance.