Yes, this is another one of those "accessing a json with javascript". Indulge me, I read the rest of the answers, event this one, and didn't help.
I have the following code
var display_order_message = function(res, status) {
alert(res.status+' '+res.message+' '+res["message"]);
};
$("#ticketform").submit( function(event) {
data = {};
var args = {
type:"POST",
url:"someurldoesntmatterhere",
data:data,
dataType:"json",
success: somefunctionsheredontmattereither,
complete: display_order_message
};
$.ajax(args);
event.preventDefault();
});
Now, using Firebug I can see that the json which is returned is
{"status": 200, "qa": [], "message": "order canceled", "qb": []}
The alert in the code above prints
200 undefined undefined
So, why is it that I can access .status but not .message or ["message"]? And how to I access the message?