ragazzi ho il seguente script ajax e su firfox tutto funziona correttamente ma su internet explorer viene visualizzata una pagina bianca. lo script l'ho trovato in rete e sembrava funzionare ma oggi ho scoperto che con explorer non funziona. sapete aiutarmi?
qui potete vedere la pagina in funzione
link
logicamente funziona con firfox.
Codice PHP:
<script type="text/javascript" charset="utf-8">
function Inint_AJAX() {
try { return new ActiveXObject("Msxml2.XMLHTTP"); } catch(e) {} //IE
try { return new ActiveXObject("Microsoft.XMLHTTP"); } catch(e) {} //IE
try { return new XMLHttpRequest(); } catch(e) {}
alert("XMLHttpRequest not supported");
return null;
};
function dochange(src, val) {
var req = Inint_AJAX();
req.onreadystatechange = function () {
if (req.readyState==4) {
if (req.status==200) {
document.getElementById(src).innerHTML=req.responseText; //retuen value
}
}
};
req.open("GET", "italia.php?data="+src+"&val="+val); //make connection
req.setRequestHeader("Content-Type", "application/x-www-form-urlencoded;charset=iso-8859-1"); // set Header
req.send(null); //send value
}
window.onLoad=dochange('provincia', -1); // value in first dropdown
</script>
vi ringrazio in anticipo