There are two ways to do this. The old school “choose an option and submit to restore the page”, which works almost everywhere, and the new AJAX methods to download the second drop-down content without refreshing the page.
Both have advantages / disadvantages, so it comes down to what works best for your purposes. The oldschool method does not require any javascript at all, but since it accesses the form through the server, you will get a “clear the window and then redraw the page” flicker.
The AJAX method bypasses the flickering update, but will also not work in browsers with Javascript disabled. To process AJAX calls and the combination of the drop-down list, a little more code is required, and on the server side the code will be almost the same for both methods: the same requests, the same search loops, only different output methods.
source share