Ver Mensaje Individual
  #1 (permalink)  
Antiguo 10/01/2007, 01:53
Finseneu
 
Fecha de Ingreso: octubre-2003
Mensajes: 540
Antigüedad: 20 años, 6 meses
Puntos: 1
Funciona en Firefox pero no en Explorer

Así de simple, es codigo que encontré por ahí y lo adapte consiguieno que funcione correctamente en FF pero en IE6 no produce ningun tipo de efecto.
Si me pueden ayudar a hacerlo trabajar les agradesco desde ya.

Código:
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 sendData(){


  divResultado = document.getElementById('hidded');

  name=document.form1.name.value;
  email=document.form1.email.value;
  msg=document.form1.msg.value;    

  //instanciamos el objetoAjax

  ajax=objetoAjax();

  //usando del medoto POST
  //archivo que realizará la operacion

  ajax.open("POST", "contact_proc.php", true);

  ajax.onreadystatechange=function() {

  if (ajax.readyState==4) {

	//mostrar resultado
  	divResultado.innerHTML = ajax.responseText	

  }
  
  }

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

ajax.send("name="+name+"&email="+email+"&msg="+msg)
  
}