Why are you using mockjax? From what I understand mockjax is just for mock up purposes only, you should be using ajax. Like so:
$('#a').editable({
validate: function(value) {
if($.trim(value) == '') return 'This value is required.';
},
type: 'text',
url: '/post',
pk: '123', // id of the row in your db...
title: 'Enter Value',
params: function(params) {
var data = {};
data['id'] = line;
data['field'] = params.name;
data['value'] = params.value;
return data;
},
ajaxOptions: {
dataType: 'json'
},
display: function(value, response) {
$(this).text(response.new_value_from_server);
},
success: function(response, newValue) {
// output what ever you want here if the submit was successfull...
}
});