I can get the return json string parse with $.post(), but not $.ajax().
{"result": "success", "id": "1"}
I can get the return json string parse with $.post(), but not $.ajax().
{"result": "success", "id": "1"}
Nothing the actual code for post is:
post: function( url, data, callback, type ) {
// shift arguments if data argument was omited
if ( jQuery.isFunction( data ) ) {
type = type || callback;
callback = data;
data = {};
}
return jQuery.ajax({
type: "POST",
url: url,
data: data,
success: callback,
dataType: type
});
},
as the docs say, it is simply a shorthand for $.ajax