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

October 19th, 2008 / xajax 0.5 - Release Candidate 2

Good news everyone,

we decided to make another release candidate before releasing the final version of xajax 0.5. This release contains a few minor bugfixes. The plugins comet and swfupload are fully compatible with this versions. You can upgrade safely from the included SVN revisions.

Please, take some time to download this release; load it up and run it through it's paces. We need as much feedback as possible as the stable release will come much sooner than you may think! We are looking forward to dropping the legacy support for PHP4 and the old syntax once xajax 0.5 stable is released.

... the gift of ajax to your php apps with xajax ...

Latest Development Blog Post

August 11th, 2008 / The next step ... xajax 0.6

We're not wasting any time... following release of xajax 0.5 RC1... we've begun the planning for xajax 0.6. Of course, our main focus is to ensure that the xajax 0.5 stable release contains the cleanest, leanest and easiest ajax implementation possible. However, we are also laying the ground-work for the next period of innovation.

What can you do?

Get involved in the discussion(s) in the forum. Post your ideas, questions and concerns.

Get involved in spreading the word. Whether you blog, post or author articles, we're asking for your help to spread the word about xajax; help to document the advanced features that make xajax unique with tutorials; or develop plugins to extend the capabilities available to new users.

Put your talent and experience to use. If you have experience with javascript and / or PHP and want to contribute your time and effort, contact us.

So, what are we planning?

For starters, we are going to take full advantage of PHP5 (even supporting STRICT mode). A good number of deprecated (unnecessary) functions will be eliminated providing better performance and a cleaner namespace. Existing code will be reviewed for ways to use new PHP functions (like json_encode and xmlreader) for better response times.

Stay tuned for more details!