JQuery JEditable stay in edit mode on error
- by Justin
I'm successfully using jeditable to submit via a function using
jQuery.ajax and the async : false option , but am having an issue
aborting if an error is returned.
How can I get the edit box to stay activated and / or revert back to
the original value if there are errors? I'm returning http status
codes.
so something like
async : false .ajax submit here...
if (xhr.status == 200) {
return value;
else {
alert ('returned error');
// keep edit box activated but available for another try, or revert back to original value
}
I tried not returning a value from the function, which keeps the edit
box activated and ready for another submit, but then the ESC key
doesn't work anymore and if I click outside the edit area, the edit
box stays.
Thanks in advance!