Dropdownlist ajax problem


I have two dropdownlists one is dependent of another

i want to disable when particular option choosed in first dropdown list then the dependent dropdownlist must show its value and it must be disabled?

but coding in ajax

echo CHtml::tag(‘option’,array(‘value’=>$value,‘selected’=>‘selected’,‘disabled’=>‘disabled’),CHtml::encode($value),true);

does not works?

why? how to change it?

I personally don’t think it’s a good idea to set a disabled option to be selected by default.

I’d rather register another piece of ajax code not in the tag but somewhere else.

It seems you have to use ‘success’ parameter and there define a js-code to disable the second dropdown.