**This is the code for the display of search result**
<?php ?>
<div class="search-box">
<?php $this->widget('zii.widgets.jui.CJuiTabs',
array(
'htmlOptions' => array( 'style' => 'font-family: Verdana;font-size: 12px;' ),
'tabs' => array(
'Doctor' => $this->renderPartial('application.modules.listing.views.doctorsearch._search',array(), TRUE),
'StaticTab 2' => array('content' => 'Content for tab 2', 'id' => 'tab2'),
'StaticTab 3' => array('content' => 'Content for tab 3', 'id' => 'tab3'),
'Jobs' => array('ajax' => Yii::app()->createUrl('Jobs/JobSearch/ShowForm')),
// panel 3 contains the content rendered by a partial view
//'AjaxTab' => array('ajax' => $this->createUrl('..')),
// Get Content From Another page. Also Pass Parameter
//'Static View'=>'Content for tab 1',
),
// additional javascript options for the tabs plugin
'options' => array(
'collapsible' => true,
),
// set id for this widgets
'id'=>'MyTab',
));
?>
</div>
<div id="search-results">
</div>
**This is the view that renders the Clistview**
<script>
function showrResultNextPage(id, result){
//$("#other-widgets").hide();
$('#search-results').html(result);
}
</script>
<?php
$this->pageTitle=Yii::app()->name . ' - ' . Yii::t('ui', 'Persons');
enter code here
$this->breadcrumbs=array(
Yii::t('ui','Persons'),
);
?>
<h2><?php echo Yii::t('ui', 'Persons'); ?></h2>
<?php $this->widget('zii.widgets.CListView', array(
'dataProvider'=>$dataProvider,
'ajaxUpdate'=>true,
'afterAjaxUpdate'=>'showrResultNextPage',
'template'=>'{sorter}{pager}{summary}{items}{pager}',
'itemView'=>'_view',
//'ajaxUpdate'=>'search-results',
'pager'=>array(
'maxButtonCount'=>'3',
),
)); ?>
**This is the partial _view file**
<div class="view">
<b><?php echo CHtml::encode($data->getAttributeLabel('listingid')); ?>:</b>
<?php echo CHtml::encode($data->listingid); ?>
<br />
<b><?php echo CHtml::encode($data->getAttributeLabel('cityid')); ?>:</b>
<?php echo CHtml::encode($data->cityid); ?>
<br />
</div>
**The Controller code to display search result in div tag**
<?php
class DoctorSearchController extends Controller {
public $layout='polllayout';
public function actionResult(){
$model = new Listing();
$dataProvider=new CActiveDataProvider('listing', array(
'pagination'=>array(
'pageSize'=>Yii::app()->params['pageSize'],
'pageVar'=>'page',
),
));
$this->render('search_results',array(
'dataProvider'=>$dataProvider,
));
}
}**

Help












