When I use below script to retrieve the data from users-sv.php in realtime, the datatable used via bootstrap 3 doesn't work. Rather it shows as a normal table with all the styles and all but without search function, sort functions and etc. Where am I missed on the below script to make the tables functions work again. Thank you very much!
<script>
function loadUserData() {
var xhttp = new XMLHttpRequest();
xhttp.onreadystatechange = function() {
if (this.readyState == 4 && this.status == 200) {
document.getElementById("TableCont").innerHTML = this.responseText;
}
};
xhttp.open("GET", "users-sv.php", true);
xhttp.send();
}
setInterval(function(){
loadUserData();
},1000);
window.onload = loadUserData;
</script>