To start with xajax first we want to download the latest xajax.(ie.,xajax 0.5)
you can download it from here
the steps are
//the function be any thing you like . but it should be according to php rules.
//code to be executed
$res= new xajaxResponse();
//this step is to create a new xajax response object.this line should not be omitted.
$res->assign("div1","innerHTML","text to be displied");
//assign function is for xajax 0.5 the function for older version is addAssign() with same parameters.
//the first parameter is the element id where the message to be displayed.
//The second parameter is the attribute of the object specified in parameter1.
//The third is the text to be displied. It can be even a php variable.
//this is specifically for xajax 0.5
//processRequests() is the function used in older versions
You can even pass arguments for the function.