I'm new to Javascript, so hope you bear with my easy question:

I have a parent page with a form (form1) containing a text input box (text1). I have a hyperlink to pop up another window with a page of dynamic choices.

I want to be able to pass back the choice from the popped-up window to the text input box.

The text input box name may change from one page to another (eg. it may be "form1.text1" on one page, but "form456.text123" on another page), so it needs to pass its reference to the pop-up window. In other words, the same pop-up window is going to be used for various text input boxes.

How do I do this?