Jul 10
Andreas Kalsch has written a simple library, Protoload, that handles the Ajax loading events that are common place as a way to show users that something is happening on the server, in a particular location:
E.g. a faw XHR example:
JAVASCRIPT:
-
var R = new XMLHttpRequest();
-
R.onreadystatechange = function() {
-
if (R.readyState == 4) {
-
// Do something with R.responseXML/Text …
-
$('thirdBox').stopWaiting();
-
}
-
};
-
R.open(method, uri, true);
-
$('thirdBox').startWaiting();
-
R.send(method == 'GET' ? null : query);
[via Ajaxian]

Recent Comments