syntax

hi all,

i used ajax in my view file.i want to call a controller function from view.i used

‘url’=>CController::createUrl(‘Productsubsubcategory/DynamicSubcategory’), this but it doesnt show anything how to call a controller function from view with using ajax.

you can call controller like this




Yii::app()->getController()->YourFunction();



this will get current loaded controller

If you are in a view, you can refer to the controller with $this, so:


$this->createUrl('Productsubsubcategory/DynamicSubcategory'),