Ajaxito is a pretty small ajax class, based on moo.ajax and microajax, it only weights 1kb uncompressed, to use it, just call it like:
new Ajaxito( url, callback, post );
- url: The url to get the data
- callback: The function to execute once the ajax request has been done
- post:This last parameter is optional, here you can include the post body
Here is an very basic example on how to use it
-
span class=”st0″>’ajax.php’, ‘alertResponse’, ‘var1=3&var2=test’
Here is the code.
-
-
/*
-
Ajaxito
-
By Rene Lopez Caballero <http://www.mywebexperiences.com/javascript/ajaxito/>
-
Licensed under the MIT License: http://www.opensource.org/licenses/mit-license.php
-
*/‘Microsoft.XMLHTTP’‘post’:‘get’‘Content-type’, ‘application/x-www-form-urlencoded’‘Connection’, ‘close’
-