I tried nulling the xmlhttp object, but still remains the same. I dont really understand how the error gets triggered. Not all the table cells show undefined, only two columns does that. The other column which is also updated with the AJAX response goes blank instead of saying undefined. There are no differences between these columns though. I cant think of a reason why firefox would do it... any suggestions??
Firefox - 'undefined' error
Collapse
X
-
Problem sorted,
" xmlObj.readySta te == "4" || xmlObj.readySta te=="complete" "
This is the line that had the problem. The readyState receives only a numeric response and no string. So this was breaking the script here when i compare readyState to "Complete" and was returning an empty responseText all the time. So when i tried to split responseText and add it to the div elements the first element went null and the others were saying undefined.
Any explanation on why this would break in firefox alone would be appreciated.
Thanks for all your help guys
CheersComment
-
I'm not sure which browsers require "complete", but you should also add in a check for status, i.e.
[code=javascript]if (xmlObj.readySt ate == 4 || xmlObj.readySta te == "complete") {
if (xmlObj.status == 200) { // OK
// now it's ready...[/code]Comment
Comment