|
View:
New views
4 Messages
—
Rating Filter:
Alert me
|
|
|
AJAX Error 0x80040111 (NS_ERROR_NOT_AVAILABLE)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. |
|
|
Re: AJAX Error 0x80040111 (NS_ERROR_NOT_AVAILABLE)Your not in the correct state to read that variable.
Check out http://svn.bluga.net/HTML_AJAX/trunk/js/HttpClient.js for an example on how it should be done. _readyStateChangeCallback is the method that checks the status -josh kamo wrote: > > 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. > > > > _______________________________________________ Html_ajax-devel mailing list Html_ajax-devel@... http://lists.bluga.net/mailman/listinfo/html_ajax-devel |
|
|
Re: AJAX Error 0x80040111 (NS_ERROR_NOT_AVAILABLE)> Hi! Thank you for the reply. I'm not sure how to adapt the sample code you sent me to my case, due to my dreadful Javascript coding abilities. Although I understand the inner logic I don't recognize some other underlying layers of functioning. If I sent you my AJAX Javascript code could you kindly try to adapt and comment it. The thing is that at this moment I am implementing some GIS functions on PHP/PostgreSQL/PostGIS that are rather complex and time demanding. Also if you agree I would be very proud to make a reference to your efforts on my MSc or other related works. -- Best regards
|
|
|
Re: AJAX Error 0x80040111 (NS_ERROR_NOT_AVAILABLE)Hey,
I dont really have time to help I would recommend using a library to handle your AJAX needs either HTML_AJAX or something else. -josh kamo wrote: > > > Hi! > > Thank you for the reply. I'm not sure how to adapt the sample code you sent > me to my case, due to my dreadful Javascript coding abilities. Although I > understand the inner logic I don't recognize some other underlying layers of > functioning. If I sent you my AJAX Javascript code could you kindly try to > adapt and comment it. > > The thing is that at this moment I am implementing some GIS functions on > PHP/PostgreSQL/PostGIS that are rather complex and time demanding. Also if > you agree I would be very proud to make a reference to your efforts on my > MSc or other related works. > > -- Best regards > > > > > JoshuaEichorn wrote: > >> Your not in the correct state to read that variable. >> Check out http://svn.bluga.net/HTML_AJAX/trunk/js/HttpClient.js for an >> example on how it should be done. >> >> _readyStateChangeCallback is the method that checks the status >> -josh >> >> > > _______________________________________________ Html_ajax-devel mailing list Html_ajax-devel@... http://lists.bluga.net/mailman/listinfo/html_ajax-devel |
| Free embeddable forum powered by Nabble | Forum Help |