xajax is easy! Just include xajax, register
a function (or an object or class method)...

<?php
include './xajax/xajax_core/xajax.inc.php';

$xajax = new xajax();

$rqstAdd =& $xajax->register(XAJAX_FUNCTION, 'doAdd');
$rqstReset =& $xajax->register(XAJAX_FUNCTION, 'doReset');

// set the parameters
$rqstAdd->setParameter(0, XAJAX_JS_VALUE, 39);
$rqstAdd->setParameter(1, XAJAX_JS_VALUE, 571);

$xajax->processRequest();

function doAdd($a, $b)
{
    $response = new xajaxResponse();
    $response->assign('answer', 'innerHTML', $a + $b);
    $response->assign('reset', 'style.display', 'block');
    return $response;
}

function doReset()
{
    $response = new xajaxResponse();
    $response->clear('answer', 'innerHTML');
    $response->assign('reset', 'style.display', 'none');
    return $response;
}
then add a call to the function in your HTML or javascript...

<form action="#" method="post">
<input type="button" onclick="<?php $rqstAdd->printScript(); ?>" id="btnAdd" value="Click Me" />
<input type="button" onclick="<?php $rqstReset->printScript(); ?>" id="btnReset" value="Reset" />
<p id="answer"></p>
</form>
then see the result in the browser instantly!

Try it now:
New! Program xajax using Object Oriented programming!
Show the sample
Want to learn more about xajax?
See the tutorial...



Latest Release

September 6th, 2007 / xajax 0.5 beta 4 ... get it now ...

Now available via the SourceForge file repository, we are happy to announce, xajax 0.5 beta 4. Beta 4 represents a solidification of the xajax php and javascript code, so from this point, the xajax interface will remain mostly unchanged until stable release. We have added the ability to customize debug, warning and error messages, thus allowing for easier development and debugging for non-english speaking programmers. In addition, we have greatly improved the documentation that is available for the xajax api. The HTML control library has been greatly enhanced and now contains a control class for all standard HTML controls. There are currently two validators available (although a validator is not required to use the library) which support HTML 4.01 TRANSITIONAL and XHTML 1.0 TRANSITIONAL. Additional validators will be developed to support the rest of the current standards. Together, the security fix, bug fixes and new features make beta 4 the release you will want to get... right away!

Latest Development Blog Post

January 16th, 2008 / Moving toward a new release candidate

The current revision of xajax 0.5 beta 4b has been out for some time now... and we have very few bugs reported. The development team is working on a couple updates and then we will release a xajax 0.5 release candidate. Soon we hope to have the following items implemented and tested: 1) Ability to set common, post and get request header values, both globally and locally (at the time of the request) 2) Pass values and function parameters in a type consistent manner; both to and from the server. This will allow pesky values like NULL to be transferred properly (currently NULL causes problems or is converted to Zero, etc...) 3) A new comet plugin for streaming response commands from the server (a version of this *may* be included with the xajax full release, but it's updates will be maintained separately) 4) Additional languages for status and debug messages Please, remember to stop by the forum for details and discussion!