<?php
echo $form2->labelEx($model, 'tipoalojamento');
echo $form2->dropDownList($model, 'tipoalojamento', CHtml::listData(TipoAlojamento::model()->findAll(),
'tipo_alojamento', 'tipo_alojamento'), array(
'prompt' => 'Todos',
'activeId'=>'Casa_tipoalojamento_venda',
'ajax' => array(
'type' => 'POST',
'url' => CController::createUrl('Casa/dynamicTipo'),
'update' => '#Casa_tipo_venda',
'data' => array('tipo' => 'js:this.value'),
)));
?>
why ajax don’t fire?
same code diferent elements , works fine
<?php
echo $form2->labelEx($model, 'tipo');
echo $form2->dropDownList($model, 'tipo', CHtml::listData(Casa::model()->findAll('activo=1 AND for_rent=1'), 'tipo', 'tipo'), array(
'prompt' => 'Todos',
'activeId'=>'Casa_tipo_venda',
'ajax' => array(
'type' => 'POST',
'url' => CController::createUrl('Casa/dynamicLocalidade'),
'update' => '#Casa_localidade_venda',
'data' => array('tipo' => 'js:this.value'),
)));
?>