When I submit a request, a error was occurred.
Uncaught TypeError: Object [object Array] has no method 'remove'
from: ext.axd?v=38586:8817
The wrong code : this.queue.waitingList.remove(item);
waitingList has no method 'remove'
This error led to my data cannot refresh
The entire code:
Attachment 7616Code:onResult : function (options, success, response) {
if (success === true) {
if (options.mode === "css") {
Ext.util.CSS.createStyleSheet(response.responseText);
} else {
var head = document.getElementsByTagName("head")[0],
el = document.createElement("script");
el.setAttribute("type", "text/javascript");
el.text = response.responseText;
head.appendChild(el);
}
var i = 0,
item = this.queue.getItem(options.url);
if (item !== null) {
item.loading = false;
}
if (options.loadCallback) {
options.loadCallback.apply(window, [options]);
}
if (options.groupCallback) {
options.groupCallback.step();
}
while (this.queue.waitingList.length > i) {
item = this.queue.waitingList[i];
if (item.url === options.url) {
if (item.loadCallback) {
item.loadCallback.apply(window, [item]);
}
if (item.groupCallback) {
item.groupCallback.step();
}
this.queue.waitingList.remove(item);
} else {
i++;
}
}
}
else {
Ext.net.DirectEvent.showFailure(response, response.responseText);
}
this.queue.dequeue(options);
this.doLoad();
},