Right now, the server response I\'m working with sends back a JSON response like this:
{\"status\":1}
After saving, jeditable places the actual
There's a simple way of doing this by using the callback. .editable()
converts any response to a string, so the response has to be converted to a JSON variable. The values can then be retrieved and then written using a '.text()' method. Check the code:
$("#myField").editable("http://www.example.com/save.php", {
submit : 'Save',
cancel : 'Cancel',
onblur : "ignore",
name : "sentText",
callback : function(value, settings) {
var json = $.parseJSON(value);
$("#myField").text(json.sentText);
}
});