When I try to post an array with string index via Ajax, no data will be transferred. Please let me know the reason.
var coord=new Array;
coord["x"]=12;
coord["y"]=12;
coord["w"]=44;
coord["h"]=66;
console.log(coord);
var parameter={coord:coord};
$.ajax({
type: 'POST',
data: parameter,
dataType: 'json',
context: this,
url:'http://localhost/server/main/crop_image',
success: function(response) {
},
error: function() {
},
complete: function() {
}
});
data: JSON.stringify(parameter)