Javascript 重新加载div内容并对表元素进行排序
我可以使用ajax重新加载div内容,但无法对表内容进行排序<使用ajax重新加载div后,code>sorttable.js不起作用 我已经浪费了很多时间来寻找解决方案。请任何人建议我如何重新加载div内容并对表进行排序Javascript 重新加载div内容并对表元素进行排序,javascript,jquery,ajax,sorttable.js,Javascript,Jquery,Ajax,Sorttable.js,我可以使用ajax重新加载div内容,但无法对表内容进行排序sorttable.js不起作用 我已经浪费了很多时间来寻找解决方案。请任何人建议我如何重新加载div内容并对表进行排序 xmlHttp.onreadystatechange = function(){ if(xmlHttp.readyState==4){ document.getElementById('displayarea').innerHTML = xmlHttp.responseText;
xmlHttp.onreadystatechange = function(){
if(xmlHttp.readyState==4){
document.getElementById('displayarea').innerHTML = xmlHttp.responseText;
setTimeout('AutoRefreshValid()',75*1000); // JavaScript function calls AutoRefresh() every 75 seconds
}
}
xmlHttp.open("GET","RPT_STATUS_AJAX_DIV_REAL_ADMIN.jsp?order=<%=strOrder%>&OrderBy=<%=strOrderBy%>",true);
xmlHttp.send(null);
xmlHttp.onreadystatechange=function(){
如果(xmlHttp.readyState==4){
document.getElementById('displayarea')。innerHTML=xmlHttp.responseText;
setTimeout('AutoRefreshValid()',75*1000);//JavaScript函数每75秒调用一次AutoRefresh()
}
}
open(“GET”、“RPT\u STATUS\u AJAX\u DIV\u REAL\u ADMIN.jsp”?order=&orderBy=,true);
xmlHttp.send(空);
当ajax调用完成时,请调用可排序函数。下面给出了一个简单的原型
$.ajax({
url: 'your_url',
success:function(resp) {
// put content in div
$('element').sortable();
}
});
请提供代码的详细信息..xmlHttp.onreadystatechange=function(){if(xmlHttp.readyState==4){document.getElementById('displayarea')。innerHTML=xmlHttp.responseText;setTimeout('AutoRefreshValid()',75*1000);//JavaScript函数调用AutoRefresh()每75秒}xmlHttp.open(“GET”、“RPT\u STATUS\u AJAX\u DIV\u REAL\u ADMIN.jsp?order=&OrderBy=”,true);xmlHttp.send(空);使用简单的js和ajax函数,你可以解释更多如何调用和在哪里调用。甚至我也需要修复表头。