<div id="list{$rs['aid']}" contenteditable="true" onblur="postlist('$rs[aid]')" onkeydown="if(window.event.keyCode == 13){event.cancelBubble=true;event.preventDefault();event.stopPropagation();postlist('$rs[aid]')}">{$rs['list']}</div>
function postlist(aid) {
var xhr = new XMLHttpRequest();
xhr.open('POST', '?qzurl=$qzurl&dirname=$dirname&file=$file&action=edit_list' );
xhr.setRequestHeader("Content-type","application/x-www-form-urlencoded");
xhr.send('aid='+aid+'&list='+document.getElementById("list"+aid).innerText);
xhr.onreadystatechange = function () {
if (xhr.readyState == 4 && xhr.status == 200) {
if(xhr.responseText=='ok'){
location.reload();
}
}
};
}