Ver Mensaje Individual
  #1 (permalink)  
Antiguo 05/04/2012, 09:30
donangelomix
(Desactivado)
 
Fecha de Ingreso: marzo-2012
Mensajes: 108
Antigüedad: 12 años, 2 meses
Puntos: 1
nueva funcion ajax para principales navegadores

hola tengo esta funcion ajax::pero quisiera saber como seria pero para todos los navegadores por lo menos los principales firefox,chome,


Por angelo27

Claber

100 de clabLevel





Envíale un mensaje privado


Código Javascript:
Ver original
  1. function nuevoAjax()
  2. {
  3.         /* Crea el objeto AJAX. Esta funcion es generica para cualquier utilidad de este tipo, por
  4.         lo que se puede copiar tal como esta aqui */
  5.         var xmlhttp=false;
  6.         try
  7.         {
  8.                 // Creacion del objeto AJAX para navegadores no IE
  9.                 xmlhttp=new ActiveXObject("Msxml2.XMLHTTP");
  10.         }
  11.         catch(e)
  12.         {
  13.                 try
  14.                 {
  15.                         // Creacion del objet AJAX para IE
  16.                         xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
  17.                 }
  18.                 catch(E)
  19.                 {
  20.                         if (!xmlhttp && typeof XMLHttpRequest!='undefined') xmlhttp=new XMLHttpRequest();
  21.                 }
  22.         }
  23.         return xmlhttp;
  24. }