I have a problem sending data together, but thanks to the guidance of ramiramilu, I figured out a solution ....
Get the SerializeObject Plugin
$.fn.serializeObject = function()
{
var o = {};
var a = this.serializeArray();
$.each(a, function() {
if (o[this.name]) {
if (!o[this.name].push) {
o[this.name] = [o[this.name]];
}
o[this.name].push(this.value || '');
} else {
o[this.name] = this.value || '';
}
});
return o;
};
script
function submit_createNewFeeScheme()
{
$.ajax({
type: "Post",
url: "/Qualification/CreateNewFeeScheme",
dataType: "json",
contentType: "application/json; charset=utf-8",
data: JSON.stringify({ ZonesList: selectedZonesList, newFeeSchemeData: $("#NewFeeSchemeForm").serializeObject() }),
success: function (data) {
alert(data);
},
error: function (jqXHR, textStatus, errorThrown) {
}
});
}
toxic source
share