rsAjax Demo

In this demo, the server receives the message, $msg = $_POST.msg, then instantiates the following HTML fragment:

<b><?php echo $msg;?></b> likes turnips.

If $msg is empty, the server sets $response.error and $response.errorMessage; the client then picks up the error message and displays it. To see the individual files involved in this demo, download


   Response displayed as innerHTML

 Response displayed as text