mirror of
https://github.com/danieleteti/delphimvcframework.git
synced 2024-11-17 16:55:54 +01:00
17 lines
361 B
JavaScript
17 lines
361 B
JavaScript
|
function AJAX() {
|
||
|
var me = this;
|
||
|
this.callback = null;
|
||
|
|
||
|
function listener() {
|
||
|
me.callback(this.status, this.response);
|
||
|
}
|
||
|
|
||
|
var oReq = new XMLHttpRequest();
|
||
|
oReq.addEventListener("load", listener);
|
||
|
|
||
|
this.get = function(URL, callback) {
|
||
|
me.callback = callback;
|
||
|
oReq.open("GET", URL);
|
||
|
oReq.send();
|
||
|
}
|
||
|
}
|