[HTML_AJAX-devel] AJAX Error 0x80040111 (NS_ERROR_NOT_AVAILABLE)

kamo joaofgo at gmail.com
Tue Feb 19 20:28:55 MST 2008


 
 Hi!

 > I'm having some problems to debug some AJAX oriented code that follows:

	
function sendAjaxRequest(formIndex, outputElement, flagElement){

var Form 	     = document.forms[formIndex];
var requestString  = getRequestString(Form);
var XMLHttp        = makeXMLHttpObject();
			
			// Output the status element
			build_loading_flag(flagElement);

			XMLHttp.open("post", Form.action, true);
			XMLHttp.setRequestHeader("Content-Type",
"application/x-www-form-urlencoded; charset=UTF-8");
			
			XMLHttp.onreadystatechange = 
				function (){
					if(XMLHttp.readyState == 4){
						// This is resultant response form the server
						showResults(XMLHttp.responseText, outputElement);
						destroy_loading_flag(flagElement);
						// Resets the form content
						//document.forms[formIndex].reset(); 
					}
					else{
					if (XMLHttp.statusText != "OK"){
						alert("An error has occurred. Status: " + XMLHttp.statusText);
						destroy_loading_flag(flagElement);
					}
					else {
						destroy_loading_flag(flagElement);
					}
				     }
				};
				// This would be set to null in case of a GET request
				XMLHttp.send(requestString); 
			}	

 Every time I invoke this function Firefox error console throws the
following message at the line that calls the statusText attribute:

[Exception... "Component returned failure code: 0x80040111
(NS_ERROR_NOT_AVAILABLE) [nsIXMLHttpRequest.statusText]"  nsresult:
"0x80040111 (NS_ERROR_NOT_AVAILABLE)"

Can someone help me out on this one. I'm not proefficient in this matters.
 -- Thanks in advance.



-- 
View this message in context: http://www.nabble.com/AJAX-Error-0x80040111-%28NS_ERROR_NOT_AVAILABLE%29-tp15581605p15581605.html
Sent from the HTML_AJAX Dev/Support mailing list archive at Nabble.com.



More information about the Html_ajax-devel mailing list