Great ! Thanks !:D
Right, sorry, jQuery.map returns a jQuery object, not an array, use
this instead, I tested this time :D
$('#text').get(0).value = $.map( $('select option'), function( o ){
return o.value;
}).join(', ');
Ariel Flesler
On 21 nov, 11:22, guix69 <[EMAIL PROTECTED]> wrote:
> Thanks for your rep
Thanks for your reply !
But firebug says join is not a function..what the...
What do you want from the options ? the value ? as in: wrote:
> The literal answer would be $('#TheSelect').html() but I suspect that
> is not what you're after.
>
> Do you have a sample of the select's HTML, and the required result of
> the concatenation (given that sample)?
>
> On Nov 20, 4:22
My select looks like this :
paris
london
madrid
I would like to have this in the textfield
paris;london;madrid
or even
;paris;london;madrid
since it would be easier :)
The goal is to have one variable with all the options of my SELECT so
that I can pass the
values to a php script... Mayb
The literal answer would be $('#TheSelect').html() but I suspect that
is not what you're after.
Do you have a sample of the select's HTML, and the required result of
the concatenation (given that sample)?
On Nov 20, 4:22 pm, guix69 <[EMAIL PROTECTED]> wrote:
> Hello, I guess the title says it a
6 matches
Mail list logo