[Php-avanzado] JavaScript y IE6

hernan galvan hernangalvan79 en hotmail.com
Jue Feb 12 20:17:40 ART 2009


Para debugear recomiendo instalarte en el firefox el addon 'firebug' y el addon 'web developer'. Se facilita mucho encontrar los errores. Por otra parte, cada uno tiene sus gustos y sé que se aprende mucho mas usando ajax 'puro' con el XMLHttpRequest; pero a fines prácticos a mi me resulta mucho mas sencillo usar Prototype, o alguna otra librería... y te olvidás del ie, del firefox, y del XMLHttpRequest.

 

Saludos!
 
> From: leonardot en pegasusnet.com.ar
> To: php-avanzado en pato2.fi.mdp.edu.ar
> Date: Thu, 12 Feb 2009 19:45:18 -0200
> Subject: Re: [Php-avanzado] JavaScript y IE6
> 
> Hola Mauro,
> 
> y qué error te da la consola de errores de JS en los ie ???
> 
> El jue, 12-02-2009 a las 17:49 -0300, Mauro Giuffo escribió:
> > buenas, tengo un problema con un script, funciona con navegadores como
> > fierfox, opera chrome pero no con ie6 ni ie7.
> > 
> > 
> > el codigo js es el siguiente:
> > 
> > <script type="application/javascript" >
> > 
> > 
> > function nuevoAjax() 
> > { 
> > var xmlhttp=false; 
> > try 
> > { 
> > // Creacion del objeto AJAX para navegadores no IE 
> > 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; 
> > }
> > 
> > 
> > function agregar_item_carrito(id)
> > { 
> > ajax=nuevoAjax(); 
> > ajax.open("POST", "agregar_item_carrito.php", true); 
> > ajax.setRequestHeader("Content-Type",
> > "application/x-www-form-urlencoded"); 
> > ajax.send("id=" + escape(id)); 
> > ajax.onreadystatechange=function() 
> > { 
> > if (ajax.readyState==4) 
> > { 
> > alert(ajax.responseText);
> > //document.getElementById("texto").innerHTML=ajax.responseText; 
> > } 
> > } 
> > }
> > 
> > 
> > </script>
> > 
> > 
> > 
> > y esta parte es donde llamo:
> > 
> > <td><a onClick="agregar_item_carrito('1')"><img border="0"
> > id="img_carrito1" src="img/carrito1.png" height="25"
> > onclick="this.src='img/carrito2.png'" /></a></td>
> > 
> > ------------------------------
> > 
> > muchas graciass
> > mauro giuffo
> > 
> > _______________________________________________
> > Php-avanzado mailing list
> > Php-avanzado en pato2.fi.mdp.edu.ar
> > http://www3.fi.mdp.edu.ar/cgi-bin/mailman/listinfo/php-avanzado
> -- 
> Leonardo Tadei
> leonardot en pegasusnet.com.ar
> http://blog.pegasusnet.com.ar
> Firma pública: http://www.pegasusnet.com.ar/LeonardoTadei-public.key
> 
> _______________________________________________
> Php-avanzado mailing list
> Php-avanzado en pato2.fi.mdp.edu.ar
> http://www3.fi.mdp.edu.ar/cgi-bin/mailman/listinfo/php-avanzado

_________________________________________________________________
Descargá ya gratis y viví la experiencia Windows Live.
http://www.descubrewindowslive.com/latam/index.html
------------ próxima parte ------------
Se ha borrado un adjunto en formato HTML...
URL: http://www3.fi.mdp.edu.ar/cgi-bin/mailman/private/php-avanzado/attachments/20090212/0083ab08/attachment.htm 


Más información sobre la lista de distribución Php-avanzado