Problemas con activeDropdownlist y Ajax, Problem

Hola, tengo un problema a la hora de generar un formulario.

Tengo un campo activeDropdownlist para seleccionar unos valores pero quisiera lanzar un evento que segun sea el valor seleccionado, mostrar u ocutlar uno o mas campos o elementos.

algo como esto

[i]Hi, I have a problem to create a form. I have a activeDropDownList to select some values and launch an event depending of the selected value, then show or hide some form fields or elements

this is what I have [/i]

<?php echo CHtml::activeDropDownList($model,‘tipos_usuario_id’,

CHtml::listData(Tipos_Usuario::model()-&gt;findAll(),'id','tipo'),

[indent]array([/indent]

[indent][indent]‘ajax’ => array([/indent][/indent]

[indent][indent]‘type’=>‘GET’,[/indent][/indent]

[indent][indent]‘url’=>CController::createUrl(‘controller/ajaxaction’),[/indent][/indent]

[indent])[/indent]

[indent]);[/indent]

?>

y en controlador

and the controller

public function actionAjaxaction()

{

    [indent]if(Yii::app()-&gt;request-&gt;isAjaxRequest &amp;&amp; isset(&#036;_GET['tipos_usuario_id']))[/indent]





    [indent]{[/indent]

[indent]…[/indent]

[indent]}[/indent]

pero hasta ahi llego. dentro del controlador iria la logica de lo que quiero devolver para actualizar el formulario, pero no se como hacerlo

but I really don’t know how to go ahead. inside the controller I will put the logic that I want to return to update the form, but I don’t know how to do it

Te conviene devolver algo en JSON y en en AJAX poner en el evento successs una funcion para que actualice lo que queres… No es muy complicado pero si un poco de trabajo arduo.

Saludos,