Scroll to top after Pagination in CListView

Hi guys,

Hopefully somebody can point me in the right direction here. When using a default pagination widget, my “posts” page is updated using AJAX, but the page doesn’t scroll to the top. The result is rather unsightly—the results change but the viewer is stuck halfway down the page. You can even see this problem in the default “blog” example. How does one alleviate this problem? Without AJAX it works fine, obviously. Here is my code:


$this->widget('zii.widgets.CListView', array(

	'dataProvider'=>$dataProvider,

	'itemView'=>'_view',

	'template'=>'{pager}{items}{summary}{pager}',

	'summaryText'=>false,

));

Cheers,

Josh

I would like to know as well

I use the following to configure the widget




  'afterAjaxUpdate'=>'

                 window.scrollTo(0,0)

                 ',

but it is not working

ahh, sorted,




 'afterAjaxUpdate'=>'

                js: window.scrollTo(0,0)

                 ',