akbo de probar y sigue sin funcionar....
Código HTML:
<Script>
function toggle(what) {
var aobj = document.getElementById(what);
if( aobj.style.display == 'none' ) {
aobj.style.display = '';
} else {
aobj.style.display = 'none';
}
}
function CrearXMLHttp(){
XMLHTTP=false;
if(window.XMLHttpRequest){
return new XMLHttpRequest();
}else if(window.ActiveXObject){
return new ActiveXObject("Microsoft.XMLHTTP");
}
}
// suponiendo que tu div se llama loading
function OpenPage(url,id){
req=CrearXMLHttp();
if(req){
req.onreadystatechange = function() { manejador( id ); }; // aca cambie
req.open("POST",url,true);
req.send(null);
toggle('loading'); // ojo aqui
}
}
function manejador(id){
if(req.readyState == 4){
if(req.status == 200){
toggle('loading'); // ojo aca
document.getElementById(id).innerHTML=req.responseText;
}else{
alert("Error"+req.statusText)
}
}
}
function cargacuadro(id){
var donde = document.getElementById("url").value;
var url = "ajaxtest.php?id="+donde;
OpenPage(url,id);
}
</Script>