Hi. I just discovered something that I found odd. I have mys listbox with several store items [item ID, item name].
<select multiple="multiple" size="4" name="storeListBox" id="storeListBox">
<option value="11">item 1</option>
<option value="12">item 2</option>
<option value="13">item 3</option>
<option value="10">item 4</option>
</selec>
In my javascript I have the following code:
jQuery('#btnAddItem').click(function(){ addItemToStorageList(); });
function addItemToStorageList()
{
var stores = jQuery('#storeListBox').val();
alert(stores);
}
Upon selecting 3 items from the list and clicking the 'add' button, the alert displays '11,13,10'. But why is the alert triggered 3 times?