How to populate one dropdown based on selection in another dropdown?
This blog will solve some of the basic doubts which are quite frequent in SDN forums and will be very useful for beginners to learn how to do scripting in htmlb.
To get the key of the currently selected entry.
To get the index of the currently selected entry.
What is new with this blog?
To get the value/text of the currently selected entry.
This can be used in many situations where some validation of data is to be done and value of the dropdown is needed.
In my scenario, I have taken two dropdownListBox, country and state.
Based on the selected country in the first dropdown, states will be loaded in the second dropdown.
When a country is selected in the COUNTRY dropdown, states are populated in the second dropdown.
Now check out the code here.
Check out the code and give your valuable comments.