I am trying to create an object for AJAX. I know who to create constructors and methods for an object, but I don't know how to do it for AJAX. My version for the constructor:
function Ajax(method, destination, send){
this.method=method.toUpperCase();
this.destination=destination;
this.send=send;
}
var ajax=new Ajax('POST', '../info.html', true);
The main thing is that I don't understand how to get the results after the ReadyState==4 and the status=200. I know how to get the responseText, but I don't know how to create a method that can get the responseText and return it. Please help!
What I want to be able to do:
ajax.getResults();