ciao!!
ho notato che il mio script non funziona se uso firefox![]()
vi posto il codice
con IE 7 e anche con IE 7 funziona!codice:<html> <div id=risultato></div> <script language=javascript> function getXMLHttp() { var xmlhttp = null; if (window.ActiveXObject) { if (navigator.userAgent.toLowerCase().indexOf('msie 5') != -1) { xmlhttp = new ActiveXObject('Microsoft.XMLHTTP'); } else { xmlhttp = new ActiveXObject('Msxml2.XMLHTTP'); } } if (!xmlhttp && typeof(XMLHttpRequest) != 'undefined') { xmlhttp = new XMLHttpRequest() } return xmlhttp } objHTTP = getXMLHttp(); objHTTP.open('GET', 'indirizzo.php', true); objHTTP.onreadystatechange = function() {elaboraRisposta()} objHTTP.send(null); function elaboraRisposta() { if (objHTTP.readyState == 4) { var risposta=objHTTP.responseTEXT; if(risposta!=''){ document.getElementById('risultato').innerHTML=risposta; } } } </script>
con firefox viene fuori undefined..perchè??![]()
![]()
(lo script di base è quello che c'è qui)
![]()
![]()
![]()

Rispondi quotando