array.join didn't want to work for me but it worked by changing: myArray[myIndex] += $(this).get(0); to myArray[myIndex].push($(this).get(0));
Thanks. -bennybobw On Jun 29, 3:03 pm, "Ganeshji Marwaha" <[EMAIL PROTECTED]> wrote: > array.join does that right? > > -GTG > > On 6/29/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > > > > I'm working on a script that gets <option> elements based on some > > logic. So I have > > if(!myArray[myIndex]) { > > myArray[myIndex] = $(this).get(0); > > } > > else { > > myArray[myIndex] += $(this).get(0); > > } > > > Then later I append them to an select element with: > > $(this).append(myArray[thisIndex]); > > > which works great if the myArray[thisIndex] only has one element, but > > if the array has more than one object I get [object HTMLOptionElement] > > [object HTMLOptionElement] etc. > > > Is the only way append object to loop through an array of individual > > objects or is there a simpler way to append a bunch of objects > > together?