hmm I keep getting this error in firefox:
Error: [Exception... "Component returned failure code: 0x80040111 (NS_ERROR_NOT_AVAILABLE) [nsIXMLHttpRequest.status]" nsresult: "0x80040111 (NS_ERROR_NOT_AVAILABLE)" location: "JS frame ::
myfile :: handleResponse :: line 237" data: no]
Source File:
myfile
Line: 237
and an "Unspecified Error" in IE, for the xmlHttpRequest object I am trying to use.
I'm using it elsewhere but this particular instance it doesnt seem to work (while everywhere else in the same .js file it works)
heres the code which works everywhere except in this one case, if anybody has stumbled on such a snag, please post a solution, else if anybody would like to check the source file out, ill email it. thx
Code:
function getServings(recipe_name) {
var url="get.jsp?serv_recipe=" + recipe_name;
xmlHttp.open("GET", url, true);
xmlHttp.onreadystatechange=handleResponse;
xmlHttp.send(null);
// handle processed output
function handleResponse(){
if (xmlHttp.status != 200) {
alert("OMFG");
}
if(xmlHttp.readyState == 4 && xmlHttp.status == 200) {
var getVal = xmlHttp.responseText;
return getVal;
}
}
}
oh and I believe xmlHttpRequest.status is where the problem lies, not so sure though