ok mi dite il perchè con IE funge mentre con Firefox no vi posto il codice complteto:
Codice PHP:
var myRequest = null;
function CreateXmlHttpReq(handler){
var xmlhttp = null;
try {
xmlhttp = new XMLHttpRequest();
} catch(e) {
try {
xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
} catch(e) {
xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
}
}
xmlhttp.onreadystatechange = handler;
return xmlhttp;
}
function myHandler() {
if (myRequest.readyState == 4 && myRequest.status == 200) {
e.innerHTML = myRequest.responseText;
}
}
function pagexmlinscomm(){
var idc=document.getElementById('idc').value;
var utente=document.getElementById('utente').value;
var testo=document.getElementById('testo').value;
var stringa="idc="+idc+"&utente="+utente+"&testo="+testo;
myRequest = CreateXmlHttpReq(myHandler);
e = document.getElementById("divcommcover");
myRequest.open("POST","inc/inscomm.php",false);
myRequest.setRequestHeader("content-type", "application/x-www-form-urlencoded");
myRequest.send(stringa);
}
questo e la parte html:
Codice PHP:
<div id="divcommcover"></div>
<form name="formcomm" id="formcomm">
<input name="idc" id="idc" type="hidden" value="<?php print $idc; ?>">
<input name="utente" type="text" class="txtseach" id="utente" size="50" maxlength="250">
<textarea name="testo" cols="62" rows="7" class="textarearic" id="testo"></textarea>
<input name="button" type="button" class="BTseach" id="button" value="Inserisci commento" style="cursor:pointer" onClick="pagexmlinscomm()">
</form>
ripeto con IE funge mentre con firefox no per quale motivo???