Prototype
Introduction
Library to support AJAX.
Using
Library
just add
<script type="text/javascript" src="prototype.js"></script>
to the header section of the html file.
Making a Request
Is by Definition asynchronous.
new Ajax.Request('<RelativeURL>',
{ method:'get',
onSuccess: function(transport)
{
var response = transport.responseText || "no response text";
alert("Success! \n\n" + response);
},
onFailure: function()
{
alert('Something went wrong...')
}
});