2
Good evening, I’m trying to display only sellers from a specific store. This store already appears automatically when the coupon number is entered. But to display the seller, I need a query comparing to the variable of the store query that is within the JS, how do I take this variable and use it in comparison to bring the list of sellers of that store? Can someone help me with this
<script type='text/javascript'>
    $(document).ready(function() {
        $("input[name='comprovante']").blur(function() {
            var $loja = $("input[name='loja']");
            var $idloja = $("input[name='idloja']");
            $.getJSON('../function2.php', {
                comprovante: $(this).val()
            }, function(json) {
                $loja.val(json.lnome);
                $idloja.val(json.idloja);
            });
        });
    });
</script>
Possible duplicate of Match php variable to javascript variable
– Luiz Felipe