AjaxPlus
is small a library of AJAX modules, including:
Fetches data via an AJAX request every x milliseconds.
var newsGetter = new AjaxModule({
request : Server.getData,
interval : 40000
});
newsGetter.on('done', function(data){
$newsPanel.update(data);
});
newsGetter.start();
Monitors all AJAX requests during a page's life time. If the number of failed requests equals maxFailures
before the resetTimer
amount passes, AjaxMonitor
will change its internal state to offline. By default, it will also abort all requests other than its own heartbeat until it is back online.
var monitor = new AjaxMonitor({
heartbeatUrl : '/',
maxFailures : 10,
resetTimer : 30000
});
Also included is AjaxPoll
and AjaxQueue
. Read more about AjaxPlus.
View the docs for a jsDoc
documentation, or check out the Wiki for step-by-step explinations of how to use all of the classes.
Simply include the minified or non-minified production builds in web app.
AjaxPlus
depends on the WebUtil library. This small library is already built into the distribution and does not need to be included.
Written by Anthony Agostino.
Licensed under the MIT license.