Hmmmm... diciamo che mi manca ancora qualche base mi sa per affrontare il discorso come lo hai impostato tu, ma vedrò di provvedere :P
Nel frattempo ho risolto così:
Diciamo che è un workaround non troppo pulito, ma serve allo scopo :Pcodice:var xmlHttp; function createXMLHttpRequest() { if (window.ActiveXObject) { xmlHttp = new ActiveXObject("Microsoft.XMLHTTP"); } else if (window.XMLHttpRequest) { xmlHttp = new XMLHttpRequest(); } } function Div1StateChange(id) { if (xmlHttp.readyState == 4 && xmlHttp.status == 200) { document.getElementById('div1').innerHTML = xmlHttp.responseText; } } function Div2StateChange(id) { if (xmlHttp.readyState == 4 && xmlHttp.status == 200) { document.getElementById('div2').innerHTML = xmlHttp.responseText; } } function myRequest(page,id) { createXMLHttpRequest(); if (id == 1) { xmlHttp.onreadystatechange = Div1StateChange; } else if (id == 2) { xmlHttp.onreadystatechange = Div2StateChange; } xmlHttp.open("GET",page,true); xmlHttp.send(null); }

Rispondi quotando