Add a new table item via pop-up window

Hi coders. I would like to ask if anybody could advice me how to solve following problem:

Simply said, I have two tables. One table lists people and the other one lists certificates that belong to them.

Add action for certificates uses a select box, in which all people from People table are listed. The problem occurs if I want to add a certificate for a person, who does not exist in the People table. In this case I have to normaly run People controller and a person through add action.

Could anybody to advice my, how to add person through a pop-up window? In my pop-up, I would like to run /people/add action and update the select list in my /certificates/add window automatically after closing the pop-up window?

I know that probably this is simple thing but as I am self-teaching coder, I need a small hint to finish this.

Thank you very much!

You would do this with a JavaScript onclick handler and an Ajax call in the handler for the “Submit” button in your popup.

Thank you @Zuluru . I will try.