Re: PAGER_WRAPPER + MDB2+HTML_AJAX + autoserver

From: Date: Mon, 09 Apr 2007 16:14:14 +0000
Subject: Re: PAGER_WRAPPER + MDB2+HTML_AJAX + autoserver
References: 1  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-27024@lists.php.net to get a copy of this message
T A wrote:
Hello, I've managed to do a normal paging with PAGER_WRAPPER and MDB2,only now i want to it with ajax too using the autoserver. This is the function which should do the paging from my class which is included from the autoserver file: function paging($pageID=null){
       require_once 'Pager/Pager_Wrapper.php';
       $conn    = $this->create_conn();
       $user_id = $_SESSION["sess_user_id"];
      $pager_params = array( 'mode' => 'Sliding', 'append' => false,'path' => '',
     'fileName' => 'javascript:remoteHW.paging(%d);',
     'perPage' => 5,'delta' => 1);
    $query = "SELECT * FROM history";
      $paged_data = Pager_Wrapper_MDB2($conn, $query, $pager_params);
         -------- The standard paging code----
    return $content;
} The problem is that this only works for the first page. When i click the link for the other pages the content does not change,it remains on the first page. No error. I don't think i'm building the $pager_params correctly. Could you please help?Thanks. _________________________________________________________________ Express yourself instantly with MSN Messenger! Download today it's FREE! http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/ I've never used Pager but you might find this article on Pager and AJAX useful: http://www.alberton.info/pear_pager_tutorial_javascript_navigation.html
-josh

« previous php.pear.general (#27024) next »