MCPcopy Create free account
hub / github.com/OpenReservation/OpenReservation / ajax

Function ajax

OpenReservation/wwwroot/Scripts/respond.js:286–302  ·  view source on GitHub ↗
(url, callback)

Source from the content-addressed store, hash-verified

284 },
285 //tweaked Ajax functions from Quirksmode
286 ajax = function (url, callback) {
287 var req = xmlHttp();
288 if (!req) {
289 return;
290 }
291 req.open("GET", url, true);
292 req.onreadystatechange = function () {
293 if (req.readyState != 4 || req.status != 200 && req.status != 304) {
294 return;
295 }
296 callback(req.responseText);
297 }
298 if (req.readyState == 4) {
299 return;
300 }
301 req.send(null);
302 },
303 //define ajax obj
304 xmlHttp = (function () {
305 var xmlhttpmethod = false;

Callers 1

makeRequestsFunction · 0.85

Calls 1

callbackFunction · 0.70

Tested by

no test coverage detected