我想动态地将表单加载到bootstrap模式中,但模式只是吐出主页面的代码。
代码:客户
public function bookService($serviceIid){
if($this->session->userdata('cityId')==false || isset($serviceId)==false){ // user has not selected any city
// some way to redirect user to select city
}
if(!$this->session->userdata('userId')){ // user not logged in
$this->load->model('Model_users');
$data['forms']=$this->Model_users->login();
$this->load->view('view_login',$data);
}
}
服务器:
{{1}}
当我直接从浏览器点击url时,我得到正确的输出,但是ajax调用返回了我的主页的代码。
答案 0 :(得分:0)
if(!$this->session->userdata('userId')){ // user not logged in
$this->load->model('Model_users');
$data['forms']=$this->Model_users->login();
return $this->load->view('view_login',$data);
}
您没有返回视图:)