I am new to Javascript. I am designing one page in which i want to fill the 2 form fields through the pop up window.

In the parent window i have 2 input fields
Name _________ Search
Roll No _________

What I want is when ever user click on this search image it will open one pop up window

In that pop up window there is one input box
Name ________ Search
Suppose user don't know the full name, he just type the 4-5 chars of first name and press search
In the same pop up window, after fetching the result from the database it will show the Name and roll Number .
Lets say 4-5 results match the string searched.
Then I will select one of them.
After selectiion, In the parent window I want the Name and roll no fields get filled.

Thanx in Advance.

I have a problem to my pop up window. What I want to happen is that in my main HTML page, I have there a link beside a text field. Upon clicking the link a pop window must open and in there a search engine where in when you click one of the results, it will automatically be filled up in the text field then the pop up will close. Can somebody from here help me with the codes?