JQuery JEditable stay in edit mode on error

北慕城南 提交于 2019-12-06 02:30:45

Not sure if this helps in your situation, but jeditable has a reset method in it...

try...

this.reset();

this will revert the element back to display mode with the original value.

To stay in editmode,just set response header "HTTP 404" and render a error text.

PHP:

header('HTTP/1.1 400 Bad Request');
echo "Error Text";

Add this:

$(this).editable("disable");

This should stop your errors from being editable, not sure about reverting back. I am kinda fighting the same issue with reverting back right now, but i know nothing about JavaScript...

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!