Welcome to the JavaRanch
That's a pretty ambitious use case for someone who is new to programming. How about displaying one page with a search entry, display a new page for the search results, then a third with the selected value and whatever else you need entered? This would be much easier to implement.
If you absolutely need to implement the functionality you specified,
here is an example on how to open a new window with JavaScript. You'll have to use JavaScript to set the value back on the page. There are plenty of
JavaScript tutorials available, as well as our own
JavaScript forum to help you along.