Ajax Requests

Hello… I’m starting with Yii and I’m trying to build an user interface based on ajax requests. But there seems to be a problem with my ojects never firing any ajax requests. None of them (dropdowlists, textfields…nothing).

I’ve posted before about a CHtml::dropdownlist which does not fire ajax requests. Textfiels also don’t fire anything… Even CJuiAutoComplete does not work…


<div class="form">


   $this->widget('zii.widgets.jui.CJuiAutoComplete', array(



	'source'=>'/faturas/clientes',// <- path to controller which returns dynamic data


		'minLength'=>'1', // min chars to start search




My controller has an action like this…

  public function actionClientes($term)


		$sql = 'SELECT id, CompanyName as val, CustomertaxId as label FROM app_clientes WHERE     CompanyName LIKE :qterm ';

		$sql .= ' ORDER BY CompanyName ASC';

		$command = Yii::app()->db->createCommand($sql);

		$qterm = $_GET['term'].'%';

		$command->bindParam(":qterm", $qterm, PDO::PARAM_STR);

		$result = $command->queryAll();

		echo CJSON::encode($result); 




I don’t know if I’m doing something wrong on every time I try to do something, or if I need to configure something at Yii level in order to use ajax…

Please help me… I’m really stucked here…

I found that is something related to a application.extensions.jui.EDatePicker that I have somewhere before in my form. Without the datepicker things are getting back to normal…

How do I isolate the datepicker so it doesn’t interfere with the rest of my code?

check if this extension has its own version of jquery, you may want to use yii default version of datepicker

try : ‘source’=>’/faturas/clientes’, to ---->


and use the firebug to see what’s really happened !