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

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

serialization - Convert Any type in scala to Array[Byte] and back -

SonarQube Plugin for Jenkins does not find SonarQube Scanner executable -