[jQuery] Re: How to concatenate all the OPTIONs of a SELECT to a text field ?

2007-11-22 Thread guix69
Great ! Thanks !:D

[jQuery] Re: How to concatenate all the OPTIONs of a SELECT to a text field ?

2007-11-21 Thread Flesler
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

[jQuery] Re: How to concatenate all the OPTIONs of a SELECT to a text field ?

2007-11-21 Thread guix69
Thanks for your reply ! But firebug says join is not a function..what the...

[jQuery] Re: How to concatenate all the OPTIONs of a SELECT to a text field ?

2007-11-21 Thread Flesler
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

[jQuery] Re: How to concatenate all the OPTIONs of a SELECT to a text field ?

2007-11-21 Thread guix69
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

[jQuery] Re: How to concatenate all the OPTIONs of a SELECT to a text field ?

2007-11-20 Thread Wizzud
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