Thanks MorningZ. I just tried what you said and I got the alert for
the responseText, which is basically the sample json data I gave in my
listing. That json data looks good to me, but I cant understand why it
failed though. Do you see any issues with that data? The json
validator on www.jsonlint.com validated it fine.

On Jul 10, 11:11 am, MorningZ <morni...@gmail.com> wrote:
> Don't use the $.getJSON method as it, as you are finding out, has no
> way to handle an error...
>
> use the generic $.ajax instead
>
> var Params = {};
> Params.type = "GET";
> Params.url = "qtool";
> Params.processData = true;
> Params.data = {action: "executeQuery", entity_name: queryText };
> Params.dataType = "json";
> Params.success = function(data) {
>       alert(data);};
>
> Params.error = function(x,y,z) {
>      alert(x.responseText);};
>
> $.ajax(Params);
>
> that way "x" will be the error response from the server (which
> apparently you are running into)

Reply via email to