I recently encountered this problem and stumbled upon this question.
I resolved it with a much easier way.
You can either remove the
dataType: 'json' property from the object literal...
Or you can do what @Sagiv was saying by returning your data as
The reason why this
parsererror message occurs is that when you simply return a string or another value, it is not really
Json, so the parser fails when parsing it.
So if you remove the
dataType: json property, it will not try to parse it as
With the other method if you make sure to return your data as
Json, the parser will know how to handle it properly.
~ Answered on 2012-07-16 15:33:53