CODE
function send(){
new Ajax.Request("people.php",
{
method: 'post',
postBody: 'name='+ $F('name'),
onComplete: what
});
}
function what(req){
alert("Alert your last name is:"+req.responseText);
}
new Ajax.Request("people.php",
{
method: 'post',
postBody: 'name='+ $F('name'),
onComplete: what
});
}
function what(req){
alert("Alert your last name is:"+req.responseText);
}
This code first sends the name to people.php,and then it searches for output from people.php,and it alerts it.When you download the library you only need to specify the source of library in every page you have,and you just need to write your ajax code.There are few options in prototype,not only for request,like $F[] which is requesting value from id.

