Ver Mensaje Individual
  #6 (permalink)  
Antiguo 07/02/2008, 15:25
nilram
 
Fecha de Ingreso: julio-2007
Mensajes: 14
Antigüedad: 16 años, 10 meses
Puntos: 0
Re: Error ajax con IE

hola!!! estuve revisando y haciendo unos cambios en el codigo peor que va, no logro resolver el problema, ahora me da el siguiente error : "el objeto no acepta esta propiedad o metodo" no se si es algo que tengo q cambiar en la configuracion del IE o es que no me acepta algun metodo de los q estoy empleando . HELP!!!
el codigo me quedo como sigue:

function crearXMLRequest() {

var xmlhttp=false;
try {
// Creacion del objeto AJAX para navegadores no IE
xmlhttp=new ActiveXObject("Msxml2.XMLHTTP");
} catch(e) {
try {
// Creacion del objet AJAX para IE
xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
} catch(E) {
xmlhttp=false;
}
}
if (!xmlhttp && typeof XMLHttpRequest!='undefined') { xmlhttp=new XMLHttpRequest(); }
return xmlhttp;
}


function callback_aplicacion() {
var xmlhttp = crearXMLRequest();
if(!xmlhttp){
alert("No consegui el objeto XMLHttpObject");
}else{

Loadgif="Oficina <img src=\"imagenes/loader.gif\">";
document.getElementById("loader").innerHTML=Loadgi f;
var idEdo=document.getElementById("cmbEstado").value;
var url = "AjaxOficinaCTRL?idEdo=" + escape(idEdo);
xmlhttp.open("GET", url, true);
xmlhttp.onreadystatechange = function hello(){
if (xmlhttp.readyState == 4 && xmlhttp.status == 200) {
var oficina = xmlhttp.responseXML.getElementsByTagName("oficina" );
lista="<select name=\"cmbOficina\" id=\"cmbOficina\" style=\"width:330px;\" >";
lista+="<option value=\"0\" selected=\"selected\">Seleccione</option>";
for(i=0;i<oficina.length;i++){ //.attributes[0].nodeValue
lista+=" <option value=\""+oficina[i].attributes[0].nodeValue+"\">"+oficina[i].childNodes[0].nodeValue+"</option>";
}
lista+="</select>";

document.getElementById("lista").innerHTML=lista;
Loadgif="Oficina";
document.getElementById("loader").innerHTML=Loadgi f;
}
}; // fin del function
xmlhttp.send(null);
} //fin del else

}// fin de la funcion callback_aplicacion

cualquier ayuda me servira, muchas gracias