Tema: Alert en PHP
Ver Mensaje Individual
  #4 (permalink)  
Antiguo 06/06/2012, 17:51
Joto_p
 
Fecha de Ingreso: junio-2012
Ubicación: Santiago de Chile
Mensajes: 29
Antigüedad: 11 años, 10 meses
Puntos: 0
Respuesta: Alert en PHP

skiper0125
Muchas gracias por la pronta respuesta.

Los 3 archivos que están involucardos son:

Ajax.js
function Buscador(){
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 Buscar() {
var Texto = document.getElementById('texto').value;
var Resultados = document.getElementById('resultados');
ajax = Buscador();
ajax.open("GET","Buscar.php?q="+Texto);
ajax.onreadystatechange = function() {
if (ajax.readyState == 4) {
Resultados.innerHTML = ajax.responseText;
}
}
ajax.send(null)

}

Este es el otro (es largísimo para mandarlo) pera aca llamo la funcion
<input class="Estilojp" size="10" name="rut" type="text" id="texto" onBlur="Buscar()">

Y aca me conecto<?php
include("conexion.php");
$q = $_GET['q'];
Extraer ($q);
?>

Ahh.. cuando aprenda un poco mas voy a ocupar el edito. Solo estoy conectado hace 30 minuto.