As I remember, you just have to include the javascript in your template, set up xajax.ini with the correct function names, create a class with the right PHP functions, and then update your templates to call the xajax function in javascript. So, when then page loads, your javascript will be triggered and the name of the javascript function will be checked in the INI file and finally your PHP function will be executed and the result will be sent to your javascript.