. jQuery . . jeditable jquery ajax, ajax, :
var ajaxoptions = {
type: 'POST',
data: submitdata,
url: settings.target,
success: function(result, status) {
if (ajaxoptions.dataType == 'html') {
$(self).html(result);
}
self.editing = false;
callback.apply(self, [result, settings]);
if (!$.trim($(self).html())) {
$(self).html(settings.placeholder);
}
},
error: function(xhr, status, error) {
onerror.apply(form, [settings, self, xhr]);
}
};
html , , json. - :
var ajaxoptions = {
type: 'POST',
data: submitdata,
url: settings.target,
dataType: 'json',
contentType: 'application/json; charset=utf-8',
};
, dataType contentType :
var ajaxoptions = {
type: 'POST',
data: submitdata,
url: settings.target,
dataType: settings.dataType,
contentType: settings.contentType,
//....other settings
};
: ( ( submitdatastrong > ) , asp.net json-. jquery json plugin ajax, dataType:
if (settings.dataType == "json") {
if ($.toJSON) {
submitdata = $.toJSON(submitdata);
}
}
!!!