I get one tutorial over here http://codeigniter.com/forums/viewthread/122597/P0/
everything is find but not the pagination link.
here's my code
<script>
ajax_paging = function()
{
$("p.pagination a").click(function()
{
$.ajax({
type: "GET",
url: $(this).get(),
success: function(html)
{
$("#display-content").html(html);
}
});
});
return false;
};
</script>
<?php
if($num_results == 0)
{
echo 'No data result, please insert one';
}
else
{
?>
<div id="display-content">
<table width="100%">
<tr>
<th>CP code</th>
<th>Code</th>
</tr>
<?php foreach($records as $row){ ?>
<tr>
<td align="center"><?php echo $row->created_date?></td>
<td align="center"><?php echo $row->uid?></td>
</tr>
<?php }?>
</table>
<p class="pagination">
<?=$pagination?>
</p>
</div>
<?php } ?>
here the pagination HTML
<p class="pagination">
<strong>1</strong>
<a onclick="javascript:ajax_paging();return false;" href="http://bravonet.my/tombocrm/inside/home_fpr/5">2</a>
<a onclick="javascript:ajax_paging();return false;" href="http://bravonet.my/tombocrm/inside/home_fpr/10">3</a>
<a onclick="javascript:ajax_paging();return false;" href="http://bravonet.my/tombocrm/inside/home_fpr/5">></a>
</p>
IWhen i try to click on the pagination link it works like normal link only. the javascript ajax occur error.
i am very weak in javascript. any help would be appreciated and thx in advanced.