I've got an ajax call via jquery that executes without error until I get to the callback. The content returned looks like this:
{"UPSELLABLE":true,"OFFERTEXT":"p47r.cfm"}
Simply doing alert(upselldata); will alert the data above. But if I try access variable upselldata like a javascript object( I thought jquery did the eval work for me already ), the variables are undefined. See code below:
$.ajax({
type: "POST",
datatype: "json",
data: "ProductID=1",
url: '/templates/public/upsell_available.cfm',
success: function(upselldata) {
alert(upselldata.UPSELLABLE); // upselldata.upsellable is undefined!?!?!
}
});