Cytat
alerty:15;powiadomienia:29;
i na widocznym fragmencie strony zmieni odpowiednie numerki
....
Z góry dzieki!

Edit: Znalazłem taki fragment kodu:
window.addEventListener('load', function() { var xhr = null; getXmlHttpRequestObject = function() { if(!xhr) { // Create a new XMLHttpRequest object. xhr = new XMLHttpRequest(); } return xhr; }; updateLiveData = function() { var now = new Date(); // Date string is appended as a query with live data. // for not to use the cached version. var url = 'powiadomienia.txt'; xhr = getXmlHttpRequestObject(); xhr.onreadystatechange = evenHandler; // asynchronous requests xhr.open("GET", url, true); // Send the request over the network xhr.send(null); }; updateLiveData(); function evenHandler() { // Check response is ready or not if(xhr.readyState == 4 && xhr.status == 200) { dataDiv = document.getElementById('alerty'); // Set current data text dataDiv.innerHTML = xhr.responseText; // Update the live data every 1 sec setTimeout(updateLiveData, 1000); } } });
ktory dziala ale nie wiem, jak do spana o id="alerty" wrzucic liczbe 15 a do tego z ID pow 29. Pomozecie?