PHP Script Codes > jqSajax
jqSajax is simple way to call PHP function/method from javascript. You can use it as jQuery Plugin, so we can call php function/method as:
var result=$.x_phpfunction(va r1,var2);
or you can call like:
var result=$.x_object_method( var1,var2);
Example: to call helloworld($var1,$var2) function in PHP , you can write input button like this:
<input type="button" onclick="alert($.x_hellow orld('jhon','28'))" />
jQuery Ajax return a page (data type is XML,JSON,text,script,html ,etc), jqSajax return the result of PHP function/method you call. the variable type is the same the variable type in PHP. you can pass all variable types: array,string,number,boole an from javascript to PHP and vice versa. with jqSajax you can pass and get array (from javascript to PHP and vice versa) easier.
The demo is placed in http://satoewarna.com/jqs ajax