Changes
Title
unchanged
CListView AJAX filtering
Category
unchanged
Tutorials
Yii version
unchanged
Tags
unchanged
CListView, AJAX, filters
Content
changed
This tutorial shows how to filter CListView items by AJAX, and it's compatible with disabled JavaScript users
In my case this has been done to filter users list[...]
### Controller
CheckBoxes GET parameters are variable (in my case up to 21) so I had to use an array in my controller.
```php[...]
. CHtml::button('None', array('id'=>'selectNone'));
```
And register the following JavaScript
~~~
[javascript]
$('#selectAll').click(function(){
$('.categoryFilter').attr('checked','checked')
category = $('.categoryFilter').serialize();
$.fn.yiiListView.update([...]