Small example for the usage of sajax . It is explained according to the
function flow
step 1.) Calling javascript function using button (CLIENT SIDE)
<input class="button" name="test" value="Test" type="test">
onclick=ajax_test();>
step 2.) Function definition … Here it calls server function which is named as “loading” … (CLIENT SIDE)function ajax_test()
{
alert (”sdsdf”)
x_loading(ajax_test_diaplay)
}
Note: Here ajax_test_display is a function which will handle the
returned result
step 3.) PHP Coding .. (SERVER SIDE) (you should include Sajax2.php file)function loading()
{
return (”balavignesh”);
}
sajax_export(”loading”);
step 4.) Displaying the result (CLIENT SIDE)function ajax_test_diaplay(ret_value)
{
alert (ret_value)
}
For more information
http://www.ibm.com/developerworks/edu/os-dw-os-phpajax-i.html
http://www.modernmethod.com/sajax/