[Solved] Load Data Into Cactiveform Dropdownlist Using Ajax

Hi,

I want to load data into CActiveForm dropDownList using ajax. I have searched in the forums and found that yiisupports dependent dropdown. But I don’t want to use dependent dropdown. I have only one dropdown and I want to load data into that dropdown on an event. Please help.

Thanks in advance.

which data do you want to load, the data which are inside de comboBox?

or depending of you choice in the combo you want to load some data?

if it is the second, this can maybe help : http://www.yiiframework.com/wiki/49/update-content-in-ajax-with-partialrender/

I want to load data inside the dropDownList.

Hi,

step 1

Construct the dropdownlist content from controller

step 2

pass the array to view file.

step 3

Then from array you can fill the dropdownlist.

finished your job … cheers

I need to use ajax to fill the dropdownlist.

ok candyman in which event you want to load data into dd.list via ajax?

I am using jquery combogrid plugin. So on selecting an item in the combogrid, I want to load data into the dropdownlist.

I was able to load dropdown data using this method http://www.yiiframework.com/forum/index.php/topic/14200-updating-dropdownlist-after-writing-in-textfield/page__p__70318__hl__drop+down+ajax#entry70318