How to pass variable from popup window to its parent window?

Hello, friends. I am using asp and javascript to make a popup window for uploading image from the user’ s local machine to the folder on the server. Now there is no problem to upload the image by using a form page and a action page. But how can I send the name of the image uploaded to the parent window?

Could any one who has experience give some suggestion. Thanks very much in advance!