开发者

How to preserve user input data when Jeditable ajax post fails

开发者 https://www.devze.com 2023-01-23 16:08 出处:网络
I\'m using Jeditable in order to post some textarea data to the server. When an ajax post fails for some reason (network problem, server error etc.) it is necessary to leave the form visible and prese

I'm using Jeditable in order to post some textarea data to the server. When an ajax post fails for some reason (network problem, server error etc.) it is necessary to leave the form visible and preserve the data that user has entered. Is it possible to do开发者_高级运维 that thing with Jeditable? Thanks!


I don't have jeditable, but by reading their documentation it appears you need to override their onerror event.

onerror: function (settings, original, xhr) {
var error = eval('(' + xhr.responseText + ')');
//original.reset(); 
}
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号