!-- CSS Stylesheet --> Sajax at Modern Methods makes for an easy framework for the AJAX approach to web applications. This is a PHP class version of AJAX with a slightly different, easier calling method and less code required.

Sajax class source

multiply and subtract source:
example
source

simple, direct -- no callback:
example
source

The Basic idea:
	
<?php require('Sajax.class.php'); function subtract($a, $b) { return $a-$b; } $sax =& new Sajax(); $sax->export("subtract"); $sax->handleClientRequest(); ?> <script> <?php $sax->showCommonJS(); ?> function do_subtract_cb(c) { document.getElementById("c").value = c; } function do_subtract() { var x, y; x = document.getElementById("a").value; y = document.getElementById("b").value; sajax_do_call("subtract", [x,y,do_subtract_cb]); } </script>
download