This site is mobile accessible. Press the "Tap Here" button to use a different font-size.


Smartphone icons created by Freepik - Flaticon

The XMLHttpRequest Object

Start typing a name in the input field below:

Suggestions:

First name:

// onkeyup function to show hint
onkeyup="showHint(this.value)"

// show hints
function showHint(str) {
  if (str.length == 0) { 
    document.getElementById("txtHint").innerHTML = "";
    return;
  }
  const xhttp = new XMLHttpRequest();
  xhttp.onload = function() {
    document.getElementById("txtHint").innerHTML =
    this.responseText;
  };

// define the XMLHttpRequest Object
  xhttp.open("GET", "gethint.php?q="+str);
  xhttp.send();   
}