hello dears.
I am currently working on a project in which I want to use the Search() as just like we use with Gridview (admin view that gii generates by default.). But I want to display my search result on some other page.
here is my code.
Search code on index page.
<?php
$this->renderPartial('_search', array(
'model' => $model,
));
?>
<?php
Yii::app()->clientScript->registerScript('my-list-search', "
$('.search-button').click(function(){
$('.search-form').toggle();
return false;
});
$('.search-form form').submit(function(){
$.fn.yiiListView.update('itemslistview', {
data: $(this).serialize()
});
return false;
});
");
?>
and I want to display its result on the some other page e.g. search_result.php
<?php
$this->widget('zii.widgets.CListView', array(
'id' => 'itemslistview',
'dataProvider' => $model->search(),
'summaryText' => '',
'itemView' => '_products',
'enablePagination' => false,
));
?>
but it is not working.
How can I solve my problem ?
Thanks in advance.