jquery - how to prevent ajax returned json encoded result to appear in console? -


i'm trying build autosuggeset feature in website. users enter in text field, ajax send data php side, ran query in database, , return result array page. problem don't want browser console shows what's being returned.

here basic structures:

main.php:

<input type="text" id="title" /> <div id="suggest_box" style="display:none"></div> 

javascript:

$("input#title").keyup(function(){    var url = "suggest.php";   var data = $(this).val();    $.post (url, data)   .success (function(result){     var jsonobj    = $.parsejson( result );      var suggestobj   = jsonobj.title_list;    });  }); 

suggest.php

// returning result array  $json = new stdclass(); $json->title_list = $result;  echo json_encode($json, json_unescaped_unicode); 

i have checked autosuggest feature in other popular websites, didn't show in console, doing wrong?


Comments

Popular posts from this blog

javascript - How to synchronize the Three.js and HTML/SVG coordinate systems (especially w.r.t. the y-axis)? -

javascript - How do I find how many occurences are there of a highlighted string, and which occurence is it? -

java - Reading data from multiple zip files and combining them to one -