Ver Mensaje Individual
  #3 (permalink)  
Antiguo 05/07/2009, 11:15
Avatar de Legoltaz
Legoltaz
 
Fecha de Ingreso: agosto-2008
Mensajes: 325
Antigüedad: 15 años, 8 meses
Puntos: 6
Respuesta: Diferencia entre distintos ActiveXObject

Gracias, David.
Entonces podría dejarlo así:

Código JavaScript:
Ver original
  1. function nuevoAjax(){
  2. var xmlhttp;
  3. try{
  4. xmlhttp = new ActiveXObject("MSXML2.XMLHTTP");
  5. }
  6. catch(e){
  7. try{
  8. xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
  9. }
  10. catch(er){
  11. try{
  12. xmlhttp = new XMLHttpRequest();
  13. }
  14. catch(err){
  15. xmlhttp = false;
  16. }
  17. }
  18. }
  19. return xmlhttp;
  20. }

Última edición por Legoltaz; 17/08/2009 a las 08:05