Location: PHPKode > scripts > pAjax > pajax/tests/client.php
<?php

require_once "../class.pAjax.php";

?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
	<head>
		<title>Server Info retriever</title>
		<?php pAjax::showJavaScript(".."); ?>
		<script type="text/javascript">
      		function Server() {
      			pAjax.call(this);
      			pAjax.setDebugMode(true);
      		}


      		var _p = Server.prototype = new pAjax;


      		_p.getInfo = function () {
      			var oRequest = this.prepare("test", pAjaxRequest.POST);
				oRequest.setURI("server.php");
                oRequest.execute(pAjaxRequest.ASYNC);
      		}


      		_p.onLoad = function () {
                var data = this.getResponse();

                for (var item in data)
                    alert(item + " = " + data[item]);
      		}
		</script>
	</head>

	<body>
		<input type="button" name="check" value="Get Server Info"
			onclick="(new Server()).getInfo(); return false;">
	</body>
</html>
Return current item: pAjax