This is a very tiny javascript code to do an AJAX Request:
/* m: method ("get", "post") u: url a: async (true) or sync (false) c: callback (with 'xhr' as a parameter) d: post_data (the data to post) */ function tiny_ajax(m,u,a,c,d){with(new(this.XMLHttpRequest||ActiveXObject)("Microsoft.XMLHTTP"))onreadystatechange=function(){readyState^4||c(this)},open(m,u,a),send(d)}
And an example:
tiny_ajax('get', 'http://www.google.com', true, function(xhr) { alert(xhr.responseText) })