I load the table, which is taken from the БД mysql in the file table.php
var seconds = 1; var divid = "responsecontainer"; var url = "table.php"; function refreshdiv() { var xmlHttp; try { xmlHttp = new XMLHttpRequest(); // Для нормальных браузеров } catch (e) { try { xmlHttp = new ActiveXObject("Msxml2.XMLHTTP"); // .... } catch (e) { try { xmlHttp = new ActiveXObject("Microsoft.XMLHTTP"); } catch (e) { alert("Твой браузер не поддерживает AJAX."); return false; } } } xmlHttp.onreadystatechange = function() { if (xmlHttp.readyState == 4) { document.getElementById(divid).innerHTML = xmlHttp.responseText; setTimeout('refreshdiv()', seconds * 1000); } } xmlHttp.open("GET", url, true); xmlHttp.send(null); } The problem is that I just can’t hang an alert reacts to changes (adding a new line, deleting the old one, etc ) in a div-e with the id responsecontainer . How to do this, tried this script:
$('responsecontainer').bind("DOMSubtreeModified",function(){ alert('changed'); }); But he reacted to everything.
document.getElementById(divid).innerHTML = xmlHttp.responseText;you change everything - Grundy