0
votes

GET http://localhost:8000/getguardrate/1?_token=kSrGyMIF7twomtmIShadxWbqhNpUKlrxH6lEwDO6 500 (Internal Server Error)

this is my ajax call

$(document).ready(function() {
    $('#select2-3').on('change', function() {
        var c_id = $(this).val();
          console.log(c_id);
        if(c_id) {
            $.ajax({
                url: 'getguardrate/' +c_id,
                type: "GET",
                data : {"_token":"{{ csrf_token() }}"},
                dataType: "json",
                success:function(data) {
                    //   console.log(data);
                  if(data){
                    $('#GetsiteguardRate').empty();
                    $('#GetsiteguardRate').focus; 


                    
                    $("#GetsiteguardRate").val(data[0]['sbr_g']);                      
               
              }else{
                $('#GetsiteguardRate').empty();
              }
              }
            });
        }else{
           $('#select2-3').empty();
        }
    });
});
You can see that this is an "Internal Server Error". So the bug isn't in the javascript but in the server. Maybe you can show us your server code so we can help you ?Nathaniel Eskenazi
Please clarify your specific problem or provide additional details to highlight exactly what you need. As it's currently written, it's hard to tell exactly what you're asking.Community