So I have a dynamic form I’m using to build an SQL query. Each row of the form has another condition (i.e. 1 row would be “AND customerName LIKE Joe”), and rows can be added dynamically when the “Add Row” button is pressed (ajax). When one drop down list is changed, I use an ajax query to grab the contents of a subsequent drop down list (certain operators make sense only for certain parameters). The existing dynamic dropdownlists work, but not new ones that are added the form dynamically. I’m thinking I may have to use something like ‘ajaxComplete’ or ‘ajaxSuccess’, but I’m not sure how. I believe this is because if I spit out CHtml::activeDropDownList(…) from within an ajax response, Document.onLoad doesn’t get called again, so the .change function never attaches to the drop down list. How can I attach the .change function to a dropdownlist that is generated inside an ajax response?
Thanks in advance!
Tom