Page 1 of 1

calling PHP function using onclick event

Posted: Sun Jun 15, 2008 12:45 am
by toraj58
i already know how to call a javascript function using onclick event of a button, but i encountered problem when i tried to call PHP function; how i can do it. is it possible or not?

Re: calling PHP function using onclick event

Posted: Sun Jun 15, 2008 1:47 am
by vargadanis
Hey,

this is possible but not simple. For that you need to use a technology called AJAX. Search for it on wikibooks.org and you will find quite a few good examples. If u are getting familiar with it you can use a library: prototypejs.
If you want to build ur own look it up on mozilla's dev site. There is an AJAX tutorial and they mention the differences bw. Gecko and IE.