7 Nov 2011 6:22 AM #11
From what I've seen so far there's nothing wrong with your request, the problem is in the response.
What I'd really like is to see the response and headers from the Net tab.
As far as I can tell from those screenshots (though they aren't enough to be definitive) your response is totally wrong. It seems to be a URL wrapped in PRE tags. Obviously that will fail when it's run through the JSON decoder.
7 Nov 2011 7:46 AM #12
Many thaks once again.
I fainally got it to work but do have a few othert questions.
However, I do have other problem such as in case of internal (404 or 500) error, the response is not directed to the failure section.
7 Nov 2011 8:04 AM #13
This is documented, though you could be forgiven for not finding it:
See the last paragraph of the intro docs.
Your best bet is to treat errors as 200s but to include something in the JSON response to mark it as an error. Many people use the success property as a flag for this.
7 Nov 2011 10:55 PM #14
Many thanks skirtle. Thats exactly what im going to do!