Ver Mensaje Individual
  #1 (permalink)  
Antiguo 23/06/2009, 11:48
manoloOZ
 
Fecha de Ingreso: octubre-2008
Mensajes: 151
Antigüedad: 16 años, 7 meses
Puntos: 1
problema firefox

hola mi problema es que ajax me funciona perfecto en ie pero en firefox no y no me tira ningun error, no hace directamente.

mi codigo es el siguiente:

Código HTML:
function objetoAjax(){

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;

  }
  
  
  
  function modificar_carrito(compra,copias,total)
  {
    ajax=objetoAjax();
	ajax.open("POST", "registro.php",true);

var resul = document.getElementById("result");



 ajax.onreadystatechange=function() {

  if (ajax.readyState==4) {

  //mostrar resultados en esta capa


	


  }

  }
  ajax.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
  //enviando los valores

	
 ajax.send("id_compra="+compra+"&detalle=2" + "&copias="+copias+"&total="+total)

  
  }
function borrar_carrito(compra)
{
	
	  ajax=objetoAjax();
	ajax.open("POST", "registro.php",true);

var resul = document.getElementById("result");



 ajax.onreadystatechange=function() {

  if (ajax.readyState==4) 
  {

   }

  }
  ajax.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
	
 ajax.send("id_compra="+compra+"&detalle=3")
}
function registrar_detalle(id_album,foto,cantidad,total,tamaño,id_compra){



  ajax=objetoAjax();

  //uso del medotod POST

  //archivo que realizará la operacion

  //registro.php

var resul = document.getElementById("result");
  ajax.open("POST", "registro.php",true);

  ajax.onreadystatechange=function() {

  if (ajax.readyState==4) {

  //mostrar resultados en esta capa

resul.innerHTML = ajax.responseText;




  }

  }

  ajax.setRequestHeader("Content-Type","application/x-www-form-urlencoded");


  //enviando los valores
	
 ajax.send("id_album="+id_album+"&foto="+foto+"&cantidad="+cantidad+"&tamano="+tamaño+"&compra="+id_compra+"&precio_total="+total+"&detalle=1")

  }
function mostrar_albumes()
{
	ajax=objetoAjax();

  //uso del medotod POST

  //archivo que realizará la operacion

  //registro.php

var resul = document.getElementById("contenedor_albums");
  ajax.open("POST", "mostrar_albumes.php",true);

  ajax.onreadystatechange=function() {

  if (ajax.readyState==4) {

  //mostrar resultados en esta capa

resul.innerHTML = ajax.responseText;




  }

  }

  ajax.setRequestHeader("Content-Type","application/x-www-form-urlencoded");


  //enviando los valores
	
 ajax.send()
}
function mostrar_album(id){


ajax=objetoAjax();

  //uso del medotod POST

  //archivo que realizará la operacion

  //registro.php

var resul = document.getElementById("contenedor_albums");
  ajax.open("POST", "mostrar_album.php",true);

  ajax.onreadystatechange=function() {

  if (ajax.readyState==4) {

  //mostrar resultados en esta capa

resul.innerHTML = ajax.responseText;




  }

  }

  ajax.setRequestHeader("Content-Type","application/x-www-form-urlencoded");


  //enviando los valores
	
 ajax.send("id="+id)


  }
desde ya muchas gracias y sepan entender que aprendi ajax ayer.