Ajaxito

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

  1. span class=”st0″>’ajax.php’, ‘alertResponse’, ‘var1=3&var2=test’

Download it here

Here is the code.

  1.  
  2. /*
  3. Ajaxito
  4. By Rene Lopez Caballero  <http://www.mywebexperiences.com/javascript/ajaxito/>
  5. Licensed under the MIT License: http://www.opensource.org/licenses/mit-license.php
  6. */‘Microsoft.XMLHTTP’‘post’:‘get’‘Content-type’, ‘application/x-www-form-urlencoded’‘Connection’, ‘close’

Leave a Reply

Your email address will not be published. Required fields are marked *