Div Load With Another View


I am trying to open a div with another content from other view. To be more clear I will paste the code.

This is the menu that have a few items:

echo '<li url='. Yii::app()->createAbsoluteUrl('service/services',array('id_service'=>$service->id_service) ).'>

<a href = "#">

<p>'.$service->service .'</p></a></li>';}

This is the function to call when the item is clicked.

$("#menu_service ul li").click(function () {

var url = $(this).attr(\'url\');


This is the controller part:

public function actionServices($id_service)


	$criteria = new CDbCriteria();

	 $criteria->condition = 'id_service = '.$id_service;

		$service_model = Service::model()->findAll($criteria);


			throw new CHttpException(404,'The requested page does not exist.');





This is the partial view that call the controller

<?php $this->widget('zii.widgets.CDetailView', array(







)); ?>

for some reason is not rendering my page with the content sent from the controller. it appear blank and the data is not passed to the partial view. Any ideas ?


ajaxLink('service name',Yii:: app ()-> createAbsoluteUrl( 'service/services' , array ( 'id_service' =>$service_id)),array('data'=>array(



refer this website and have a look at this website to get idea about ajax. and after sending values in ajax mode render ur services view partially.