Popup window to Fill Selection Box in parent window
This is related to my previous question about the 2 dynamic Selection Boxes:
I have 2 selection boxes: 1 with a list of employees and 1 with a list of selected employees. Using arrows you can move an empoyee from the Available List to the Selected List. This works great and makes it very clear for our clients. Now I would like to add the following functionality:
The Available Selection box lists employees depending on a certain query depending on the chosen Department. What I would like to add is a button called 'Add Custom Employee' that brings up a popup window where I can select an employee from any department and add it to the list of Selected Employees. Problem is how can I do that. The popup window will be easy to make and will bring up a list of employees depending on your search query. Now once the employee has been found that the user wants to add to the Selected Employee list he should be able to press a 'Add this Employee' button that will close the popup and post back two variables to the parent window: EMP_ID and EMP_NAME. These variables should then be placed in the parent window in the form of an added option in the Selected Employees box.
I hope the question is clear but I can imagine it is not so to summarize:
How can I post back 2 variables from a popup window to its parent window and place them as an option in a selection box on the parent window.