I want to generate the following dropdownlist from the controller:
echo Chtml::dropDownList('book_id','', $booksList,
array(
'ajax' => array(
'type'=>'POST', //request type
'url'=>'/index.php?r=book/dynamicauthor' ,
'update'=>'#author',
'data'=>array('book_id'=>'js:this.value'),
))); //selector to update));
But the url never call the action "dynamicauthor", but when i put this code in my view it works.
I know its not a good approach to put this in the controller, but for what i want to do, i have no choice, because this code must be generated and added dynamically when i click on an action from the view.