I need some help on:
how I can query database form client side and return some values to client side add page
I have one text field , and on I enter name values if i event is KeyUp , I want to get the balance amount from the table account and display it on popup as a text
i have try to use this code , but it does not work
Code: Select all
{ // keys = event types, values = handler functions
"change keyup": function(e) {
// Your code
var $row=$(this).fields();
var str=$row["p_name"].val();
//function showHint(str) {
if (str.length == 0) {
document.getElementById("x_txtHint").innerHTML = "";
return;
}
const xhttp = new XMLHttpRequest();
xhttp.onload = function() {
document.getElementById("x_txtHint").innerHTML =
this.responseText;
}
xhttp.open("GET", "showcustbala.php?name="+str,true);
xhttp.send();
}
}
so many thanks for guide us