$(document).ready(function () {
    $("body").on("blur", ".accode", getCustname);
    $("#hprint").hide();


    function getCustname() {
        var accode = $(".accode").val();

        $.ajax({
            type: "POST",
            dataType: "json",
            url: "getexpmemdetail.php",
            data: {accode: accode},
            success: function (response) {
                if (response != "") {
                    var name = response.name,
                            aadhaar = response.aadhaar,
                            memcode = response.memcode,
                            famname = response.famname,
                            dob = response.dob;

                    $('.name').val(name);
                    $('.aadhaar').val(aadhaar);
                    $('.memcode').val(memcode);
                    $('.familyname').val(famname);
                    $('.dob').val(dob);
                }
            },
            error: function (request, textStatus, errorThrown) {
            }
        });
    }

});