Re: pininos en ajax

From: Date: Fri, 15 Sep 2006 18:04:26 +0000
Subject: Re: pininos en ajax
References: 1  Groups: php.general.es 
Request: Send a blank email to general-es+get-59636@lists.php.net to get a copy of this message
La versión más completa para crear el objeto que he encontrado es la siguiente: /* Create a new XMLHttpRequest object to talk to the Web server */ var xmlHttp = false; /*@cc_on @*/ /*@if (@_jscript_version >= 5) try { xmlHttp = new ActiveXObject("Msxml2.XMLHTTP"); } catch (e) { try { xmlHttp = new ActiveXObject("Microsoft.XMLHTTP"); } catch (e2) { xmlHttp = false; } } @end @*/ if (!xmlHttp && typeof XMLHttpRequest != 'undefined') { xmlHttp = new XMLHttpRequest(); } Es parte de una serie de articulos de IBM, en inglés:http://www-128.ibm.com/developerworks/views/web/libraryview.jsp?search_by=Mastering+Ajax----- Original Message ----- From: "Leonardo Torno Hidalgo" <torno@ciget.holguin.inf.cu> To: <php-es@lists.php.net> Sent: Friday, September 15, 2006 8:46 PM Subject: [PHP-ES] pininos en ajax
hola: estoy haciendo mis primeros pininos en ajax y desde luego google me ha ayudado y he copiado y pegado + modificados algunos códigos. llegué a algo que me funciona bien en firefox, pero en ie no me devuelve los datos, aqui le envio la declaracion del objketo. function objetoAjax() { var xmlhttp; if ( window.XMLHttpRequest ) { xmlhttp = new XMLHttpRequest (); if ( xmlhttp.overrideMimeType ) {
     xmlhttp.overrideMimeType ( 'text/xml' );
    // Ver nota sobre esta linea al final
} } else if ( window.ActiveXObject ) {
     try {
       xmlhttp = new ActiveXObject ( "Msxml2.XMLHTTP" );
     }
     catch (e) {
       try {
         xmlhttp = new ActiveXObject ( "Microsoft.XMLHTTP" );
       }
       catch (e) {}
     }
} return xmlhttp; } ahora, cuando en un onchange mando a pedir los datos usando propiamente ajax, al pasar por aqui lista = window.document.getElementById('lista'); nom = lista.value; donde lista contiene los valores, no los devuelve, nom siempre en vacio (en ie, en firefox perfecto), algo que me pueda ayudar al respecto. saludos -- Lic. Leonardo Torno Hidalgo GNU/Linux User #277382 http://elinux.cubatools.com/ http://ehome.cubatools.com/ -- PHP Spanish Localization Talk Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php


« previous php.general.es (#59636) next »