this.getHttpRequest(identifier).onreadystatechange = function() {
try {
ajaxChat.handleResponse(identifier);
} catch(e) {
try {
clearTimeout(ajaxChat.timer);
} catch(e) {
//alert(e);
}
try {
if(data) {
ajaxChat.addChatBotMessageToChatList('/error ConnectionTimeout');
ajaxChat.updateChatlistView();
}
} catch(e) {
//alert(e);
}
try {
ajaxChat.timer = setTimeout('ajaxChat.updateChat(null);', ajaxChat.timerRate);
} catch(e) {
//alert(e);
}
}
};
Refactorings
No refactoring yet !
GateKiller
July 23, 2008, July 23, 2008 08:35, permalink
Does it work if you remove all the try and catch statements?
this.getHttpRequest(identifier).onreadystatechange = function() {
ajaxChat.handleResponse(identifier);
};
This code crashes Firefox 3, badly: http://www.freeformroleplay.net/standalone/chat