retrieve the selected value of a combo select

retrieve the selected value of a combo select

hi! I have to retrieve the selected value of a combo (select) In the page there are 2-3 dynamically generated select with the same class $ ('select.inputboxattrib') and belong to  different forms but when i do

idatt = jQuery ('select.inputboxattrib'). val (),

alert (idatt);

it shows me  the value of the first select, even if I selected the second one I tried with $ (this). val ();
but when I insert it does not work anymore maybe becouse there is Each but otherwise nothing at all
please give me
a hand  to identify the value of the selected combo?  or the name of the form from the selection?  there s a hidden field with the id of the product i'm trying to retrieve its value but i don't know how
Thanks for
help
this
is the code:







window.addEvent('domready', function(){
window.top.document.updateUploader && window.top.document.updateUploader();

$$('input.inputboxquantity').each(function(el){
el.addEvent('focus', function(e){new Event(e).stop();alert('hello')});
});


$$('select.inputboxattrib').each(function(el){
el.addEvent('change', function(e){
new Event(e).stop();


idatt=jQuery('select.inputboxattrib').val(),

alert(idatt);




jQuery('#fback').html('<img src='http://miosito.it/plugins/system/imagegallery/classes/printimage.php?image=http://smiosito.it/components/com_addimage/images/1/18_zoom.jpg'>');



});
});
});