Ver Mensaje Individual
  #4 (permalink)  
Antiguo 30/03/2011, 17:11
Avatar de IsaBelM
IsaBelM
Colaborador
 
Fecha de Ingreso: junio-2008
Mensajes: 5.032
Antigüedad: 15 años, 10 meses
Puntos: 1012
Respuesta: funciones invalidas en IE

usalo así
Cita:
function fnc() {
var obj = ["Msxml2.XMLHTTP","Msxml2.XMLHTTP.4.0","Msxml2. XMLH TTP.5.0","Msxml2.XMLHTTP.3.0","Microsoft.XMLHTTP"];
var objhttp = false;
for(var i=0 ; !objhttp && i<obj.length ; i++){
try{
objhttp = new ActiveXObject(obj[i]);
}
catch(e) {
objhttp = false;
}
}
if(!objhttp && typeof XMLHttpRequest!='undefined') {
objhttp = new XMLHttpRequest();
}
return objhttp;
}



function cargarExtern(dades,divID) {
var peticio = fnc();
var obj = document.getElementById(divID);
peticio.open("GET", dades);
peticio.onreadystatechange = function() {
en ie8 funciona esto
Cita:
var objhttp = false;
objhttp = new XMLHttpRequest();
return obhttp;