rem: d.addCallbacks(function (data) { 
add: d.addCallbacks(function (response) { var data = evalJSONRequest(response);  
context:     this.expand = function(p) {        if (!p.loaded) {            p.loaded = true;            processingStart();            var request_args = {};            forEach(self.statevars, function(key) {                if (p.hasAttribute(key)) {                    request_args[key] = p.getAttribute(key);                }            });            var req = getXMLHttpRequest();            req.open('post', self.source);            req.setRequestHeader('Content-type','application/x-www-form-urlencoded');             var d = sendXMLHttpRequest(req,queryString(request_args));            d.addCallbacks(function (data) {                if (!data.error) {                    if (data.message) {                        // Add the new children into the list item that was expanded                        var ul = self.convertDataToDOM(data.message);                        appendChildNodes(p, ul);                        p.child = ul;                    }                    else {                        var oops = P(null, 'omgwtfnothinghere');                        appendChildNodes(p, oops);                        p.child = oops;                    }                    // Replace the 'expand' link with a 'collapse' one                     replaceChildNodes(p.id + '_toggle', self.getCollapseLink(p));                }                else {                    alert('did not get data :(');                    // @todo insert sad face or something                }                processingStop();            }, function () {                alert('no data for you!');                processingStop();            });        }        else {            // Replace the expand link with a collapse one and make all child UL's (all one of them) visible            // Might not be available if the user clicked 'expand' twice before the document had finished loading            if (p.child) {                replaceChildNodes(p.id + '_toggle', self.getCollapseLink(p));                p.child.style.display = 'block';            }        }    }
meta: 5659	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/5659/73d18f9d3cfa842551163f557285a90bcb3e1efc/collapsabletree.js/buggy/htdocs/js/collapsabletree.js