Get your own website Result Size: 625 x 565
x
 
<!DOCTYPE html>
<html>
<style>
th,td {
  padding: 5px;
}
</style>
<body>
<h2>The XMLHttpRequest Object</h2>
<form action="#"> 
  <select name="customers" onchange="showCustomer(this.value)">
    <option value="">Select a customer:</option>
    <option value="ALFKI">Alfreds Futterkiste</option>
    <option value="NORTS ">North/South</option>
    <option value="WOLZA">Wolski Zajazd</option>
  </select>
</form>
<br>
<div id="txtHint">Customer info will be listed here...</div>
<script>
function showCustomer(str) {
  if (str == "") {
    document.getElementById("txtHint").innerHTML = "";
    return;
  }
  const xhttp = new XMLHttpRequest();
  xhttp.onload = function() {
    document.getElementById("txtHint").innerHTML = this.responseText;
  }
  xhttp.open("GET.html", "getcustomer03d2.html?q="+str);
  xhttp.send();
}
</script>
</body>
<!-- Mirrored from www.mdssup.ma/js/tryit.asp?filename=tryjs_ajax_database by HTTrack Website Copier/3.x [XR&CO'2014], Mon, 05 Sep 2022 14:47:00 GMT -->
</html>