How to update drop-down based on radio-button selection
In this example, the user is required to select a country before the drop-down box is populated with a list of values.
How did I do this? By adding an "onclick" event to each radio button that calls a javascript function.
The javascript function does two basic things:
- re-sets the "region" drop-down to empty
- using the value of the radio button that was clicked, it adds the appropriate values to the drop-down