Check out getResponseHeader() if you are so inclined.
As for the errors, there are many ways to check for "ajax" errors, for one thing you can check the status or statusText property.
Check out getResponseHeader() if you are so inclined.
As for the errors, there are many ways to check for "ajax" errors, for one thing you can check the status or statusText property.
I know how to detect errors, that was hardly my point. I was suggesting an improvement, not tech support.
// In the third stage we use the eval function to compile the text into a
// JavaScript structure. The '{' operator is subject to a syntactic ambiguity
// in JavaScript: it can begin a block or an object literal. We wrap the text
// in parens to eliminate the ambiguity.
// This is a function that can parse a JSON text, producing a JavaScript
// data structure. It is a simple, recursive descent parser. It does not use
// eval or regular expressions, so it can be used as a model for implementing
// a JSON parser in other languages.