Hi,

I'm a newbie to Jquery. I wrote the following function for multi
select
var quantity =0;
$("#parameters").click(function () {
        var qty = 0;
        $("#parameters option:selected").each(function () {
        qty = qty+1;
        });
  $("#qty").val(qty);
  return  qty;
})

and the multi select list box with the following code

<select name='parameters' id='parameters' multiple='multiple'  >
<option value='2' >value2</option>
<option value='1' >value1</option>
<option value='3' >value3</option>
</select>

This updates a hidden form variable quantity. Now I changed to name
"parameters" to "parameters[]".

The function seems to be not working. Probably I need to length I
tried $("#parameters length()"). This seems to be not working. Can
somebody help me?


Reply via email to