Re: [solved]onclick support patch to Pager by Robert Freund
| From: | Leo Márquez | Date: | Thu, 19 Jul 2007 13:02:45 +0000 |
| Subject: | Re: [solved]onclick support patch to Pager by Robert Freund | ||
| References: | 1 2 3 4 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-27693@lists.php.net to get a copy of this message | ||
Hi,
Thanks all for your answer.
The problem is solved.
I have to combine the fileName and onclick options to don't execute the href of the <a> tag. Then I configure pager with:
'path'=>'./',
'fileName'=>'/plana.php?idplana='.$filtres['idplana'].'#',
'onclick' => 'xajax_getAgendes('.$filtres['idfitxa'].','.$filtres['idplana'].',%d)',
Filename is identical to my actual url with a final '#' character. So the link is not executed and the page don't change.
Finally with the onclick event I execute my javascript/ajax function and the result is as I expected.
Thanks again to all.
Leo
En/na Massimiliano Arione ha escrit:
Leo Márquez wrote:-- Leo Márquez [ Calidae - www.calidae.com ]Thanks for your answer Massimiliano, I was tried the method you say before and not works for me. In my html I need to do ajax calls. This one works perfectly: <span onclick="xajax_Agendes(a,b,c);"> But this one not (writed by hand, not generated with pager): <a href="javascript:xajax_Agendes(a,b,c);">click here</a> Not work because this link changes my page and I see the 'true' word in all blank screen. This is the reason I tried it with onclick patch. It seems that the <a> tag disables my ajax functionality.I hope not to go off topic, since this is not a php/pear issue. You can resolve your javascript problem using a "cancelClick" function, like the one you can find in DOMhelp library http://icant.co.uk/sandbox/domhelp/