Ver Mensaje Individual
  #4 (permalink)  
Antiguo 20/12/2017, 20:55
Avatar de zreep
zreep
 
Fecha de Ingreso: octubre-2009
Ubicación: Argentina
Mensajes: 534
Antigüedad: 14 años, 7 meses
Puntos: 12
Respuesta: Extension en PHP

Esto lo saque por ahi, no lo hice yo. Estoy probando no se porque no me trae datos desde php

Código HTML:
<html>
<head>
<script>
function showHint(str) {
    if (str.length == 0) {
        document.getElementById("txtHint").innerHTML = "";
        return;
    } else {
        var xmlhttp = new XMLHttpRequest();
        xmlhttp.onreadystatechange = function() {
            if (this.readyState == 4 && this.status == 200) {
                document.getElementById("txtHint").innerHTML = this.responseText;
            }
        };
        xmlhttp.open("GET", "https://app.com/prueba.php?q=" + str, true);
        xmlhttp.send();
    }
}
</script>
</head>
<body>

<p><b>Start typing a name in the input field below:</b></p>
<form>
First name: <input type="text" onkeyup="showHint(this.value)">
</form>
<p>Suggestions: <span id="txtHint"></span></p>
</body>
</html> 
__________________
Zreep