[英]update div after jeditable submit in rails
i want to submit the text from jeditable, store it in the database and then i don´t want to render the updated text back to jeditable field, i want to update the whole div in which the jeditable field (and maybee other text fields) is. 我想从jeditable提交文本,将其存储在数据库中,然后我不想将更新后的文本呈现回jeditable字段,我想更新jeditable字段(以及其他文本字段)所在的整个div是。
fe FE
i change the username via jeditable inplace editor, then i store the changes in the db and now i want to update the complete div which contains the username (in place editor) and also other divs, cause after the username changes, the email changes, too. 我通过可编辑的就地编辑器更改了用户名,然后将更改存储在数据库中,现在我想更新包含用户名的完整div(就地编辑器)以及其他div,这是由于用户名更改,电子邮件更改,太。
You can probably use the callback function to make a second AJAX call to get the new data. 您可能可以使用回调函数进行第二次AJAX调用以获取新数据。
$('.editable').editable('http://www.example.com/save.php', {
type : 'textarea',
submit : 'OK',
callback : function(value, settings) {
$("AREATOBEUPDATED").load("URL THAT RETURNS FULL CONTENT OF AREA");
}
});
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.