用户
 找回密码
 入住 CI 中国社区
搜索
查看: 3500|回复: 1
收起左侧

[AJAX] 求大神帮我看看是咋么回事

[复制链接]
发表于 2012-10-10 17:03:44 | 显示全部楼层 |阅读模式
下载附件 (19.94 KB)
这个弹出层验证信息不显示 但是拿出来以后它又是正常错误提示的图2是拿出来后的 图一是个ajax弹出层不会出现验证信息
function create(){
        $typeid=$this->uri->segment(3);
        $type=$this->db->get_where('news_type',array('type_id'=>$typeid))->row();
        $area=$this->db->get_where('network_city',array())->result();
        foreach($area as $r){
            $m[$r->id]=$r->title;
            }
        $this->load->view("ajax/c_news_create",get_defined_vars());
    }
    function post(){
        $type_id=$this->uri->segment(3);
        $this->load->library('form_validation',$this->rule_post);
        if(!$this->form_validation->run()){
            return $this->create();
        }
        $form = $this->form_validation->to_array();
        if(!isset($form['type_id'])){
            $form['type_id']=$type_id;
        }
        if(isset($form['timeline'])){
            $form['timeline']=strtotime($form['timeline']);
        }else{
            $form['timeline']=time();
        }
        $this->model->upload($form);
        if(method_exists($this->model,'upfile')){
            $this->model->upfile($form);
        }
         
        if(!$this->model->post($form,'id')){
            return $this->create();
        }
        $this->userview->success($this->lang->line('item_post_success')
            ,array('完成'=>"c_news/$type_id"));
    }

        控制器代码 请大神帮我分析分析 是怎么回事 ss.jpg ww.jpg
发表于 2013-1-15 13:19:35 | 显示全部楼层
貌似是编码问题吧~~要三码合一的说

本版积分规则