Post form custom pop_up to a controller or API end point.

Hi all, I have a custom action shortcut on the Accounts list view, It opens up a pop up with a list from another module called GDL_Gandalf_Table:

open_popup('GDLF_Gandalf_Table','600','400','',false,false,{ 'call_back_function':'set_return_and_save_targetlist', 'form_name':'targetlist_form','field_to_name_array':{'id':'prospect_list'}, 'passthru_data':{'do_contacts' : 1 }   } );

Instead of trying to create a regular relation I’d like to pass both the selected ID from the Accounts list view and the ID of the GDLF_Gandalf_Table selected from the pop up to a custom controller. Anyone have an Idea how this may be accomplished?

Thanks in advance.