Ver Mensaje Individual
  #6 (permalink)  
Antiguo 29/06/2006, 19:04
Avatar de B**
B**
 
Fecha de Ingreso: enero-2006
Ubicación: Monterrey,Mexico
Mensajes: 952
Antigüedad: 18 años, 3 meses
Puntos: 3
Yo uso este y me funciona en los 2:
Código HTML:
 function CreaObjeto(){
             var xmlhttp=false;
                     try {
                      xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
                     } catch (e) {
                      try {
                       xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
                      } catch (E) {
                       xmlhttp = false;
                      }
                     }

                    if (!xmlhttp && typeof XMLHttpRequest!='undefined') {
                      xmlhttp = new XMLHttpRequest();
                    }
                    return xmlhttp;
                    }
Pero si no te funciona, baja la libreria de prototype y te libras de andar creando objetos para determinadas versiones de navegadores... solamente vas a hacer :
Código HTML:
           var myAjax = new Ajax.Request (
                       url, 
			{
				method: 'get', 
				parameters: pars, 
				onComplete: showResponse
			});
Y listo , mucho mas sencillo...
Si nunca has usado esa libreria , aqui hay una liga muy buena:
http://www.sergiopereira.com/articles/prototype.js.html

Saludos..
__________________
-URL= Go PHP5.
-Age=22.
-Learning=PHP,J2EE,Struts,MAMBO,C++,JSON,AJAX,XHTML ,CSS.