EasyAJAX

A simple library for making AJAX requisitions.
For example, you can test it here by searching for a Habbo's information here using the Habbo API.
# Getting Started

You can download here the normal version and download here the minified version.


# GET Method

For using the GET method, you need to use the EasyAJAX object (easyAJAX) and the GET method, resulting in something like this:

easyAJAX.GET(url, success, error);
url: The URL from the page you want to call;
success: The anonymous function that will be called if the response is 200 (when called, the function will recieve the response);
error: The anonymous function that will be called if the response is equal to 403 or 404;
For example, the GET that is used in this page works like this:
var success = function change_data(response) {
}
var error = function error() {
}


# POST Method

For using the POST method, you need to use the EasyAJAX object (easyAJAX) and the POST method, resulting in something like this:

easyAJAX.POST(url, post, success, error);
url: The URL from the page you want to call;
post: The POST data you want to send (in x-www-form-urlencoded);
success: The anonymous function that will be called if the response is 200 (when called, the function will recieve the response);
error: The anonymous function that will be called if the response is equal to 403 or 404;