Re: onclick support patch to Pager by Robert Freund
| From: | Markus Ernst | Date: | Thu, 19 Jul 2007 11:23:45 +0000 |
| Subject: | Re: onclick support patch to Pager by Robert Freund | ||
| References: | 1 2 3 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-27691@lists.php.net to get a copy of this message | ||
Leo Márquez schrieb:
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.To me this looks like the xajax_Agendes(a,b,c) function returns true, so the browser tries to resolve this return value as the value of the href attribute. AFAICS you either have to change the JS function the way it does not return anything, or go for an onClick solution (as you actually try to do). I don't think there is a solution with the href="javascript:..." syntax and a return value; anyway you might get more advice on this in a JS group. HTH Markus