php - success not being called jQuery AJAX -


the success not being called on completion of ajax request. response request 200 have no idea why won't return anything. if inspect in chromes developer tools says 'this request has no response data available'. have made query know fact succeed.

my request:

$.ajax({                 url: 'search.php',                 datatype: 'json',                 data: {                     l_id: <?php echo $_get['l_id']; ?>                 },                 success: function(data) {                     alert(data);                     console.log(data);                     $("#datatable td:nth-child(2)").each(function () {                         $(this).html(data);                     });                 }             }); 

my search.php:

<?php  require_once '../dbconni.php';  $list_id = $_get['l_id'];  $matches = $db->query("select l_name wfp_lists l_id={$list_id}");  while($match = $matches->fetch_object()) {     $data[] = $matches->l_name; }  json_encode($data); 

i don't understand how status code of 200 can returned , success not called.. thought success called on return of http status code 200


Comments

Popular posts from this blog

many to many - Django Rest Framework ManyToMany filter multiple values -

java - Jasper subreport showing only one entry from the JSON data source when embedded in the Title band -

Java Entity Manager - JSON reader was expecting a value but found 'db' -