(own comment)
I'm trying to turn:
Ajax = {
Request : function(){
var req = Try.these(
function() {return new ActiveXObject('Msxml2.XMLHTTP')},
function() {return new ActiveXObject('Microsoft.XMLHTTP')},
function() {return new XMLHttpRequest()}
) || false;
req.open('GET', 'includes/ajax-app.php', true);
req.onreadystatechange = function() {
if(req.readyState == 4)
if(req.status == 200)
alert(req.responseText);
};
req.send(null);
}
};
into an actual object that I can initialize like this:
var a = new Ajax.Request();
I want the Ajax.Request() to return actual responseText from the
request, but how do I get req.responseText out of the object?