Re: 'ajaxing' Pager links
| From: | Leo Márquez | Date: | Thu, 11 May 2006 10:33:08 +0000 |
| Subject: | Re: 'ajaxing' Pager links | ||
| References: | 1 2 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-24042@lists.php.net to get a copy of this message | ||
Lorenzo Alberton wrote:
Hi, Leo Márquez wrote:I have tried that you propose but don't work for me. In the options array I put: $params['fileName']='getPage(%d)'; When I see the next button instead of have a javascript link I get a link to my ajax controller. Like this: http://myserver/myproject/controller.php?c=spaclientajax&m=getInformeFacturacioTiquets&pageID_informes=2 I hope you understand the problem. I need a javascript call, not an a link. For example a next button may be like this: <img src="next_button.gif" onclick="getPage(3)"> where getPage is a javascript function with ajax procedures. To do that I need to disable the <a> link generated on each link and modify my mynext param to some like this: 'nextImg'=> '<img border=0 align=\'absmiddle\' src=\'img/fl_dret_gris.gif\' onclick=\'alert(%d)\'>', But it don't work. A void alert works but not with %d value. Can I use here? ThanksI want to change Pager links to make ajax javascript calls instead of normal links. I have reviewed the Pager doc but I don't found the best way to do it. I want to change for example the next link: somecode.php?pageID=3to a javascript code: getPage(3) Have a look at the example #2 in the manual: http://pear.php.net/manual/en/package.html.pager.intro.php#package.html.pager.intro.example2 there you can see how to rewrite your links. hint: $params['fileName'] = 'getPage(%d)'; Hi Lorenzo and thanks for your answer.