theozmanbo wrote:
uploadPicture{"errors":["This file was already uploaded"]}
That is not valid JSON.
If you were returning
{"errors":["This file was already uploaded"]}
You would have more luck. In fact I'm willing to bet you'd be able to
do something like alert(data.errors[0]) - because the "data" variable
would likely already be translated to a JS object, rather than a string.
But, I don't know the details of the "ajax upload plugin" you are
using either, so I could be wrong.
As mentioned in another reply. You should probably go study up on JSON
more. It seems your core issues are within your current understanding
of JSON. You're not far off, but not quite there. :)
Shawn