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:

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

// function for showing the 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.asp?q="+str);
  xhttp.send();
}

My server has PHP installed and enabled. It does not have the capability to work with ASP.Net files. Because of this the contents of "gethint.asp" are displayed instead of providing relevant hints.