Load more with ajax

i’m newbie in yii.1.x anyone can help me for create load more page with ajax?

i tried with this tutorial http://www.9lessons.info/2009/12/twitter-style-load-more-results-with.html but not work and also i tried with infinitescroll extension but still it’s not work.

i have simple code in controller

$model = Berita::model()->findAll(array(

			'order'=>'id DESC',





and view like this


foreach ($model as $key ) {



		<h2> <?php echo $key->judul; ?> </h2>


			echo CHtml::image(Yii::app()->baseUrl."/images/".$key->gambar , '.$key->gambar',array('width'=>100,'height'=>100)); 

		?> <br />

		<span class="more" style="font-size: 14px; color: black; text-align: justify;">

		<?php echo nl2br($key->isi) ; ?>






in controller i use limit 2 to displayed post and now i want to display other post with ajax, please help

Try http://www.yiiframework.com/extension/yiinfinite-scroll/. Here’s an example: http://stackoverflow.com/questions/18592514/yii-infinite-endless-scroll-using-active-record