Hello everyone,
I went through these topics for a solution to my problem but I think my question is a bit different.
- http://stackoverflow.com/questions/180451/using-javascript-and-jquery-to-populate-related-select-boxes-with-array-structur
- http://stackoverflow.com/questions/1255992/populating-a-2nd-select-box-binding-problem
I have 3 select boxes in my form. Named 'Category', 'Subcategory', 'Topic'.
Subcategory is populated from selection of Category and topic is selected from subcategory select box.
I have created a generalized function for populating select boxes using jquery.
I am calling that function (populateSelectBox) on the change event of parent select box.
Now the Subcategory select box is easily populated on the change event of Category select box but if the subcategory has only one option populated through ajax, the change event for subcategory is not fired as there is only one item in the subcategory select box.
What shall I do in that case in ?
Please help