Hi,
I have 2 dropdown lists with category and subcategory details. If i change the category selection then the corresponding subcategory details should get loaded in the 2nd drop down list.how can i achieve this using javascript
Please help me ASAP.
If both values (for the lists) are coming from a database, then there are two approaches.
1.) Use AJAX to load the second dropdown
2.) Preload all the values from both lists into an array/arrays and then use Javascript to poulate the second list.
Number (2) is bad because it does not cater for changes made to the lists after the page is loaded. It keeps using the data that was in the database when the page was first loaded.