I have used this code for ajax pagiantion
JS file -
document.getElementById('divname').innerHTML = content;
ajax.callPage("URL"+str, ajaxSearchFilter);
tb_init('a.thickbox, area.thickbox, input.thickbox');//pass where to apply thickbox
imgLoader = new Image();// preload image
imgLoader.src = tb_pathToImage;
Php file -
<td colspan="2" align="center">
<?php
if($page != 1)
{
$pageno=$_GET['page'];
$pageprev = $pageno-1;
if($_GET['city_name'] != "")
{
echo("<a href=\"#namespace\" onclick=\"javascript:pageFilter('var&page=$pageprev');\">Prev</a> ");
}
}
$numofpages = $total / $rec_per_page;
for($i = 1; $i <= $numofpages; $i++)
{
if($i == $page)
{
echo($i." ");
}
else
{
if($_GET['city_name'] != "")
{
echo("<a href=\"#namespace\" onclick=\"javascript:pageFilter('var&page=$i');\">$i</a> ");
}
}
}
if(($total % $rec_per_page) != 0)
{
if($i == $page)
{
echo($i." ");
}
else
{
if($_GET['city_name'] != "")
{
echo("<a href=\"#namespace\" onclick=\"javascript:pageFilter('var&page=$i');\">$i</a> ");
}
}
}
if(($total - ($rec_per_page * $page)) > 0)
{
if($_GET['page'] == "" or $pageno == "")
$pageno= 1;
$pagenext = $pageno+1;
if($_GET['city_name'] != "")
{
echo(" <a href=\"#namespace\" onclick=\"javascript:pageFilter('var&flag=0&page=$pagenext');\">Next</a>");
}
}
?>
</td>
but i m not getting right result for that.it seems to be for any pagination digit click it not doing anything.can anyone help me out?:(