According to the jquery doc, $('option:selected',
ModulesListObj).val() returns the content of the value attribute of
the first matched element.

U may wish to try something like the following to get the desired array:

$('something', ModulesListObj).map(function(){
  return $(this).val();
});

TY

==

On Mon, Feb 16, 2009 at 10:33 AM, ShurikAg <shuri...@gmail.com> wrote:
>
> Actually this:
> alert(jQ("option:selected", ModulesListObj).val())
>
> works perfectly right, if there is only one select object on the page.
> If there are two or more it always picks up the first one.
>
> On Feb 15, 1:04 pm, Ricardo Tomasi <ricardob...@gmail.com> wrote:
>> That's quite a lot of code to read through in an email. Try reducing
>> your code to the least necessary to exemplify your problem, then
>> someone might take the time to help.
>>
>> From what I see:
>> alert(jQ("option:selected", ModulesListObj).val())
>>
>> This is catching all the selected options inside ModulesListObj, and
>> that will be one option for every select you added. val() will then
>> return the value only for the first element in that collection. That
>> should probably be:
>>
>> alert(jQ("option:selected", this).val())
>>
>> cheers,
>> - ricardo
>>
>> On Feb 12, 11:53 pm, ShurikAg <shuri...@gmail.com> wrote:
>>
>> > I don't believe that nobody have any suggestion...



-- 
http://ngty77.blogspot.com

Reply via email to