Ver Mensaje Individual
  #1 (permalink)  
Antiguo 20/02/2008, 17:33
Avatar de rockobop
rockobop
 
Fecha de Ingreso: octubre-2004
Ubicación: Bolivia
Mensajes: 826
Antigüedad: 19 años, 6 meses
Puntos: 1
ajax bien menos en ie7

hola a todos tengo la siguiente funcion para cargar mis ajax's

Código HTML:
function ajaxFunction()
{
var xmlHttp;
try
  {
  // Firefox, Opera 8.0+, Safari
  xmlHttp=new XMLHttpRequest();
  }
catch (e)
  {
  // Internet Explorer
  try
    {
    xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
    }
  catch (e)
    {
    try
      {
      xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
      }
    catch (e)
      {
      alert("Tu buscador no soporta AJAX!");
      return false;
      }
    }
  }
return xmlHttp
}
me funciona perfecto todo, y en casi todos los navegadores menos en ie7, alguien sabe por q puede ser esto ????

tb habia intentado de esta otra manera pero no funciona, da el mismo error

Código HTML:
function nuevoAjax()
{ 
    
    var xmlhttp=false;
    try
    {
        
        xmlhttp=new ActiveXObject("Msxml2.XMLHTTP");
    }
    catch(e)
    {
        try
        {
            // Creacion del objet AJAX para IE
            xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
        }
        catch(E)
        {
            if (!xmlhttp && typeof XMLHttpRequest!='undefined') xmlhttp=new XMLHttpRequest();
        }
    }
    return xmlhttp; 
}
__________________
:pensando: Tú no necesitas un libro mágico, un gurú carismático, rituales primitivos. Sólo necesitas tus cinco sentidos.:adios: