JQuery JEditable stay in edit mode on error
Posted
by Justin
on Stack Overflow
See other posts from Stack Overflow
or by Justin
Published on 2009-04-07T23:23:18Z
Indexed on
2010/04/15
23:13 UTC
Read the original article
Hit count: 231
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!
© Stack Overflow or respective owner