[jQuery] Re: multiple select box to textarea

2007-09-18 Thread Wizzud
This will put all selects (just selected values, no names) into textarea... var s = $('select').serializeArray(), t = []; $.each(s,function(n,v){ t[t.length]=v.value; }); $('textarea').val(t.join('\n')); FrankTudor wrote: > > > Hi all, > > I am creating a little tool that has two mult

[jQuery] Re: multiple select box to textarea

2007-09-18 Thread FrankTudor
var s = $('select').serializeArray(), t = []; $.each(s,function(n,v){ t[t.length]=v.value; }); $('textarea').val(t.join('\n')); Hi I understand maybe 40 percent of the above code. Can someone explain it? What does the brackets mean the [] brac

[jQuery] Re: multiple select box to textarea

2007-09-18 Thread Pyrolupus
On Sep 18, 9:33 am, FrankTudor <[EMAIL PROTECTED]> wrote: > var s = $('select').serializeArray(), t = []; > $.each(s,function(n,v){ t[t.length]=v.value; }); > $('textarea').val(t.join('\n')); > > Hi I understand maybe 40 percent of the above code. Ca