i would take a guess that you are missing that "this" points to two different things inside and outside the ".each" loop
which makes sense because you have "this" on the outside, and then loop against "this.children", so inside the loop "this" actually is the "nth child of this" see if this.children.each( function() { this.parent.rowTextArray.push = encodeURIComponent( $ (this).text() ); } ); works... although i will note that is just a shot in the dark without seeing more of your script On Oct 6, 1:22 pm, marty <[EMAIL PROTECTED]> wrote: > This is driving me crazy > > I'm trying to copy elements from a wrapped set into an array. > > This works: > > // build an array of text on the line > var rowTextArray = new Array(); > > // add text into array > this.children.each( function() { > rowTextArray.push = encodeURIComponent( > $(this).text() ); > } ); > > This does not: > > // build an array of text on the line > this.rowTextArray = new Array(); > > // add text into array > this.children.each( function() { > this.rowTextArray.push = encodeURIComponent( > $(this).text() ); > } ); > > Here's the error I get: > Error: this.rowTextArray is undefined > > Any help would be greatly appreciated!! > > Regards, > Marty