Sending many values from child to parent window


I need to send possibly many values from a popup child window to a parent window. Say:

List of Fruit:
Apple [Add]
Banana [Add]

Each click of add adds the fruit into a input text box, on the parent page.

Ive found this:

I could make a form for every fruit and send it back this way. It is troublesome, but can be done. Is there a more elegant solution?

Pass an array of values, or push single values onto an array.

opener.fruits = myArray;