Ver Mensaje Individual
  #3 (permalink)  
Antiguo 19/08/2008, 10:22
mex2008
 
Fecha de Ingreso: marzo-2008
Mensajes: 59
Antigüedad: 16 años, 1 mes
Puntos: 0
Respuesta: Enviar datos en consulta ajax

Viene en un js que importo. gracias por tu atencion.



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 MostrarConsulta(datos){
divResultado = document.getElementById('resultado');
ajax=objetoAjax();
ajax.open("GET", datos);
ajax.onreadystatechange=function() {
if (ajax.readyState==4) {
divResultado.innerHTML = ajax.responseText
}
}
ajax.send(null)
}