how to use jquery that display the record from the database?

how to use jquery that display the record from the database?

Great day!

Kindly help me sir/madam.. 

heres my code:



$('form').validate({

    rules: { 
order_numbr:{
            required: true,
            ordrNum:true
            
        },






jQuery.validator.addMethod("ordrNum",function(value,element){
    var isExist=false;
        $.ajax({
            type : "POST",
            async: false,
            data : "action=checkOrdrNum&id=0&orderno=" + value,
            url  : ajaxurl,
            dataType:"json",
            success: function (data) {
            //console.log(data["order_no"]);
               if (data["order_no"] >0) {
                    isExist=true;
                } 
                 
            }
        });
        //console.log(isExist);
        return isExist;//true;

    },"This order number does not exist");


Database:
order_no            order_name
23532                  order 1
32532                  order 2
53254                  order 3
53253                  order 4


let say that:  i have a 2 textbox  as you see the image.. 
ORDER NUMBER 1. <input name="order_numbr"type="text" class="textbox" id="order_numbr" value="">
ORDER NAME      2. <input name="ur_name1" type="text" class="textbox" id="ur_name1" value="">

Ive already finished the 2 case but the 3rd case not yet done kindly help me please
case 1: If the order number is empty says "this field is required".
case 2: If you enter invalid order number says "This order number does not exists".



case 3: When If you enter valid order number automatically display order name  in the textbox ORDER NAME without clicking a button.. 


Thanks, 
Glenn Michael Manuel