<?php require ('xajax/xajax_core/xajax.inc.php'); $xajax = new xajax();
$xajax→configure('javascript URI', '/');
function add2($number) {
$objResponse = new xajaxResponse(); $objResponse->assign('domain_label', 'innerHTML', $number + 2); return $objResponse;
}
$req_get_domain =& $xajax→registerFunction('add2'); $req_get_domain→setParameter(0, XAJAX_INPUT_VALUE, 'domainname'); $xajax→processRequest();
?>
<head>
<title>finger</title>
<?php
$xajax->printJavascript();
?>
</head>
<body>
Domain: <input name="domainname" id="domainname" type="text" size="30" maxlength="60"
onkeyup='<?php $req_get_domain->printScript(); ?>;'>
<div id="domain_label"></div><br />
</body>