There is a form on which buttons (links) for downloading are located, as well as three drop-down lists: "Department", "Month", "Year". It is necessary, provided that certain values are selected from the drop-down lists, so that when you click on the button, the file from the server that matches the selected conditions in the lists is downloaded.
Figuratively speaking, the link should be: http://ip-adress:port/statistika/dolgi/КОД_ОТДЕЛА/mm/su/КОД_ГОДА/КОД_МЕСЯЦА/file.txt , where the КОД ОТДЕЛА , МЕСЯЦА , ГОДА is the value codes from our drop-down lists .
How to create and describe the variable of each list correctly, and then insert it into its place in the link code so that when the variable values change, the file we need is downloaded?