Hello All! I got bored and am making an AJAX chatroom. I set a window interval for every second to check for new messages on the server. My only one question is that every once in a while an exception is being thrown. the exception message is: Error: uncaught exception: [Exception... "Component returned failure code: 0xc1f30001 (NS_ERROR_NOT_INITIALIZED) [nsIXMLHttpRequest.send]" nsresult: "0xc1f30001 (NS_ERROR_NOT_INITIALIZED)" location: "JS frame :: http://www.agoradesk.com/includes/clientjavascript/chat.js :: getChatMessages :: line 81" data: no] I can assume this is because something is timing out or data is not being retrieved or something along the lines. Does anyone else have a suggestion or a way to catch this exception?
nevermind, after extensive research (and a little bit of grey goose ) I have read that this error is caused by a bug in firefox. In order to fix this, you must create all new XML requests that have the possibility of being requested over top of each other (ie one request fireing while another is still active) is to create a new request object locally inside of each individual function call. This now eleminates any exceptions that might be thrown.
It is actually a bug in firefox though. In the other browsers, abort and a new request will cancel out or overwrite the request. Firefox doesn't :/