First, note that I have noticed that the common Yii widgets that have paginators, can go to any page without reloading the page, but just requesting it via AJAX and then changing the content of the already loaded page. Such behavior will completely satisfy my current needs.
I have a simple dropDownList
in one of my views. What I'm trying to do is to change the content of the page without reloading the page, just like Yii's widgets.
Is that possible? How?
I tried doing something like this in my controller:
if(Yii::app()->request->isAjaxRequest){
$this->renderPartial(.....);
}
and this in my dropDownList
:
<?php
echo CHtml::dropDownList('usage', 'cg', array(
'd'=>'Daily',
'm'=>'Monthly'
), array(
'submit'=>array('admin/user', 'id'=>$user->iduser),
'params'=>array('cg'=>'js:$(this).val()'),
'options'=>array(
Yii::app()->session['cg']=>array(
'selected'=>true
)
)
));
?>
but the dropDownList
keeps reloading the page.