XAJAX - Ajax applications with PHP
xajax is an open source PHP class library that allows you to easily create powerful, web-based, Ajax applications using HTML, CSS, JavaScript, and PHP. Applications developed with xajax can asynchronously call server-side PHP functions and update content without reloading the page.
XAJAX is released under LGPL licence, and you can find simple tutorial and good documentation in the official project's website. the latest release is xajax version 0.1 beta4
In short adding XAJAX to your application is simple as it could be done in 7 steps
require_once("xajax.inc.php");
$xajax = new xajax();
$xajax->registerFunction("myFunction");
function myFunction($arg)
{
// do some stuff based on $arg like query data from a database and
// put it into a variable like $newContent
// Instantiate the xajaxResponse object
$objResponse = new xajaxResponse();
// add a command to the response to assign the innerHTML attribute of
// the element with id="SomeElementId" to whatever the new content is
$objResponse->addAssign("SomeElementId","innerHTML", $newContent);
//return the XML response generated by the xajaxResponse object
return $objResponse->getXML();
}
$xajax->processRequests();
$xajax->printJavascript();


Subscribe to AJAX Magazine's feed