I not know why in following js code alert is empty without html code, my view have html code, and my_class work true for other controller, when i get alert this means it is work true js code but get data of php code without html. what do i do?
function guide_show($offset = 0) {
$find = $this -> input -> post('find');
$where = "开发者_StackOverflow社区name LIKE '%$find%' OR phone LIKE '%$find%' OR mobile LIKE '%$find%' OR address LIKE '%$find%' OR date_submit LIKE '%$find%' OR useradmin_submit LIKE '%$find%'";
$table = "guide";
$url_pag = "admin/submits/guide_show";
$order = "id";
$data = $this -> my_class -> show($where, $table, $url_pag, $order, $offset);
$this->load->view('admin/guide_show', $data);
}
jQuery:
$.ajax({
type: "POST",
dataType: "html",
url: url,
data: dataString,
cache: false,
success: function (html) {
alert(html)
},
"error": function (x, y, z) {
// callback to run if an error occurs
alert("An error has occured:\n" + x + "\n" + y + "\n" + z);
}
})
Here is My_class(library): http://pastebin.com/6DxjmBFC
Here is my htm code in view(guide_show): http://pastebin.com/mtubjzvB
Check on Firebuq -> NET [ Expand ] and show response body
精彩评论