[Php-avanzado] JavaScript y IE6
Leonardo Tadei - Pegasus Tech Supply
leonardot en pegasusnet.com.ar
Jue Feb 12 19:45:18 ART 2009
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
Más información sobre la lista de distribución Php-avanzado