Generate Widgets With Jquery

Hi guys,

Sorry about the misleading name, cant figure out how to change it :(

I am trying to create an autocomplete field by using jquery to call a controller function. (I cannot use widgets because my fields are dynamically generated by the user).

Currently I am getting a "the server responded with a status of 403 (Forbidden)" Error.

This is what I have:




                        source: "<? echo Yii::app()->createUrl('jui/autocompleteTest');?>",





public function actionAutocompleteTest()


    $res = array();

    if (isset($_GET['term']))



      $qtxt = "SELECT CONCAT(name, '(' ,ticker,')') FROM alphanoo_portfolio.stock WHERE in_market='Active' AND ticker LIKE '%" . $_GET['term'] . "%' ORDER BY last_close desc LIMIT 10";

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

      $command->bindValue("name", '%'.$_GET['term'].'%', PDO::PARAM_STR);

      $res = $command->queryColumn();


    echo CJSON::encode($res);



Any help is appreciated :)


your view code is not reachable to your controller thats why its giving error. have you given any access rules for method calling :)