1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27
|
<?php require ('../xajax_core/xajax.inc.php');
$xajax=new xajax();
$xajax->setFlag('debug',true);
$xajax->registerFunction("marche");
function marche()
{
$objResponse= new xajaxResponse();
$objResponse->assign("element","innerHTML","bonne nuit");
return $objResponse;
}
$xajax->processRequest();?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
<?php $xajax->printJavascript("../"); ?>
</head>
<body>
<form name="my_form" id="my_form" method="post" action="">
<input name="nom" type="button" id="nom" onclick="xajax_marche();" value="Submit" />
</form>
<div id="element"> salut </div>
</body>
</html> |
Partager