Dropdown list to download item

I would like to offer users the ability to select a magazine with monthly issues from a dropdown list (the magazine is a PDF). For example, the user selects the dropdown list/menu, selects the month/issue that they would like to download and clicks on the download button to download the issue.

I am using the

input onclick=“window.open(setit.options[setit.selectedIndex].value)” type=“button” value=“Download” /<<<

code but it is exhaustive as Wordpress (for reasons unknown to me) clears the code everytime an additional change is made.

Any suggestions for a plugin that could offer the above solution?