Se ti riferisci al js per la chiamata ajax eccolo:
Codice PHP:
<script>
function ajax_search(id,req,id_ric) {
var xmlHttpReq = false;
var self = this;
// Xhr per Mozilla/Safari/Ie7
if (window.XMLHttpRequest) {
self.xmlHttpReq = new XMLHttpRequest();
}
// per tutte le altre versioni di IE
else if (window.ActiveXObject) {
self.xmlHttpReq = new ActiveXObject("Microsoft.XMLHTTP");
}
self.xmlHttpReq.open('GET', 'query.php?req=' + req + '&letter=' + id + "&id_ric=" + id_ric, true);
self.xmlHttpReq.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
self.xmlHttpReq.onreadystatechange = function() {
if (self.xmlHttpReq.readyState == 4) {
updatepage(self.xmlHttpReq.responseText,id,req,id_ric);
}
}
self.xmlHttpReq.send();
}
function updatepage(str,id,req,id_ric){
if (req=="ric") {
document.getElementById("msg[" + id + "]").innerHTML = str;
}
}
</script>