In my DCT, I want to populate the second field based on the first. (not using FormAPI

I have a combo box where user will select any values say "A" and the next field is browse button. When user will click on the browse button a cgi callout is being used which extract the files from the database/table matching criteria "A" and display to the user and user should be able to select the files. But I am not clear how do I pass "A" as an parameter dynamically to my cgi callout..
can anyone assist on this ?