[jQuery] Re: call a php function with onclick

2008-10-22 Thread Kevin Thorpe
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

[jQuery] Re: call a php function with onclick

2008-10-21 Thread RotinPain
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

[jQuery] Re: call a php function with onclick

2008-10-21 Thread RotinPain
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 (