var req; var isMozilla; isMozilla = (document.all) ? 0 : 1; // TELE function tele(page) { var url = "do.php?open=tele&modules=tele&page="+page; new_AjaxGet(url, 'tele'); } tele(1); function new_AjaxGet(url, DivId) { // isMozilla - variabile da index.js if(!isMozilla) document.getElementById(DivId).innerHTML = "
"; if(window.XMLHttpRequest) { req = new XMLHttpRequest(); } else if(window.ActiveXObject) { req = new ActiveXObject("Microsoft.XMLHTTP"); } req.open("GET", url, true); req.onreadystatechange = function() {callback(DivId);}; req.send(null); } function callback(DivId) { if(req.readyState == 4) { if(req.status == 200) { response = req.responseText; document.getElementById(DivId).innerHTML = response; } else { alert("There was a problem retrieving the data:\n" + req.statusText); } } }