stefano wrote:
> Hi, I would like to know how it is possibile to call a php function
> inside an onclick=function (), I try to explain me better
Hi Stefano. Your problem is that php is on the server and
javascript/jQuery is in the web browser.
You need to get onclick to issue another page req
Here's a something based on links class name, the php code is in your
hand ;)
[HTML PAGE]
[JQUERY CODE]
//add an action to each A with class="friends",
//the action is based on the id of each A and passed as variable (see
DATA: )
$("a.friends").each (
function () {
$( this ).bind (
What I did for having php executed at onClick event is using Ajax.
You must store your functions into an external php file.
Then use the jquery ajax methods to load, execute and receive back the
result of your php code without leaving the caller page.
Process will be invisible to users (the page
3 matches
Mail list logo