[jQuery] Re: How to get the selected values in the multiselection

2009-02-11 Thread James
Can you provide more information, such as the HTML part of the multi- selection box? On Feb 10, 6:14 pm, min wrote: > Hi, James > > I have tried $('#selection').val(); , it still can only get the first > value from the values which I have selected. > > On Feb 11, 1:20 pm, James wrote: > > > $('

[jQuery] Re: How to get the selected values in the multiselection

2009-02-10 Thread min
Hi, James I have tried $('#selection').val(); , it still can only get the first value from the values which I have selected. On Feb 11, 1:20 pm, James wrote: > $('#selection').val(); > will get you an array of values. > > $('#selection').val()[0]; > will get you the first index of that array

[jQuery] Re: How to get the selected values in the multiselection

2009-02-10 Thread min
Thanks a lot! On Feb 11, 1:20 pm, James wrote: > $('#selection').val(); > will get you an array of values. > > $('#selection').val()[0]; > will get you the first index of that array > > or you could set it as a variable to get the value: > var list = $('#selection').val(); > list[0]; // first i

[jQuery] Re: How to get the selected values in the multiselection

2009-02-10 Thread James
$('#selection').val(); will get you an array of values. $('#selection').val()[0]; will get you the first index of that array or you could set it as a variable to get the value: var list = $('#selection').val(); list[0]; // first in array list On Feb 10, 3:04 pm, min wrote: > Hi, the following