rem: /* callback for Sarissa 
add: /* callback for Sarissa 
context:     p._loadXML = function(uri, callback, body, reload, extra) {        function _sarissaCallback() {        /* callback for Sarissa            when the callback is called because the data's ready it            will get the responseXML DOM and call user_callback            with the DOM as the first argument and the uri loaded            as the second            note that this method should be called in the context of an             xmlhttp object        */            if (xmlhttp.readyState == 4) {                this.xmlhttp = null;                if (xmlhttp.status && xmlhttp.status != 200) {                    var errmessage = 'Error '+xmlhttp.status+' loading '+(uri||'XML');                    alert(errmessage);                    throw "Error loading XML";                };                var dom = xmlhttp.responseXML;                if (!dom || !dom.documentElement) { /* IE bug! */                    dom = Sarissa.getDomDocument();                    dom.loadXML(xmlhttp.responseText);                }                callback.apply(self, [dom, uri, extra]);            };        };        var self = this;        /* load the XML from a uri           calls callback with one arg (the XML DOM) when done           the (optional) body arg should contain the body for the request         */        var xmlhttp = new XMLHttpRequest();        var method = body?'POST':'GET';        // be sure that body is null and not an empty string or        // something        body=body?body:null;        try {            xmlhttp.open(method, uri, true);            xmlhttp.onreadystatechange = _sarissaCallback;            if (method == "POST") {                // by default, we would send a 'text/xml' request, which                // is a dirty lie; explicitly set the content type to what                // a web server expects from a POST.                xmlhttp.setRequestHeader('content-type', 'application/x-www-form-urlencoded');            };            if (reload) {                xmlhttp.setRequestHeader("If-Modified-Since", "Sat, 1 Jan 2000 00:00:00 GMT");            }            this.xmlhttp = xmlhttp;            xmlhttp.send(body);        } catch(e) {            if (e && e.name && e.message) { // Microsoft                e = e.name + ': ' + e.message;            }            alert(e);        }    };
meta: 2380	/local1/tlutelli/issta_data/temp/all_js/javascript/2007_temp/2007/2380/a0afd65dc0ce82b7d482d20d969be827e83178d2/kupu_kjax.js/clean/kupu/common/kupu_kjax.js