从php代码中获取警报为空
Getting alert empty from php code ?
我不知道为什么在以下js代码警报是空的没有html代码,我的视图有html代码,和my_class工作对其他控制器为真,当我得到警报这意味着它是工作真正的js代码,但没有html的php代码的数据。我该怎么办?
function guide_show($offset = 0) {
$find = $this -> input -> post('find');
$where = "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);
}
})
这里是My_class(library): http://pastebin.com/6DxjmBFC
这是我的htm代码在视图(guide_show): http://pastebin.com/mtubjzvB
检查Firebuq -> NET [Expand]并显示响应体
相关文章:
- 在Javascript文件中获取PHP变量
- 如何获取PHP变量数据并将其存储在JavaScript变量中
- 从javascript数组获取php的日期时间
- 获取PHP代码中日期选择器的值
- 从javascript变量获取php会话
- 无法获取php会话变量以在javascript中设置var
- 如何使用Jquery一步一步地获取PHP数据
- 获取 PHP 中 HTML 标记 'select' 的值
- 使用 Javascript 获取 php 文件的输出
- 获取PHP变量的JavaScript不起作用
- 从 JS 函数获取 PHP 中的值
- 无法在jquery中获取PHP值
- jquery没有't从DIV数据id中获取PHP变量值,只输出变量名
- 在JAVASCRIPT中获取php选中的复选框值
- 在AJAX url中如何获取php变量的参数值
- 用ajax用js获取php
- 获取PHP URL的JS值
- 使用AJAX只获取PHP响应
- 如何在javascript变量中获取php文件的结果
- 当使用AJAX获取PHP文件以从MySQL数据库中检索数据时,会出现下拉表单disapering