本帖最后由 xuzuning 于 2014-03-15 12:50:26 编辑

解决方案 »

  1.   

    有forwardUrl。 会不会是页面直接跳转了?。
      

  2.   


    关键就是既不跳转,也不提示..我在想,,最大的可能是不是在 phpmailer类里面,抛出了异常什么的..影响了我原本的JS提示框的运作...
    但是看不太懂...
      

  3.   

    jQuery.extend({'zoombox':(function(){
    var m = $("<div class=\"modal hide fade\"></div>");
    var cnt = "";
    return {'show':function(type,obj){
    switch(type)
    {
    case 'ajax':
    cnt = "<div class=\"modal-header\" style=\"height:2em;overflow:hidden;\"><button type=\"button\" class=\"close\" data-dismiss=\"modal\" aria-hidden=\"true\">×</button><h5>出现错误</h5></div><div class=\"modal-body\"><p class=\"alert alert-error\">"+obj.message+"</p></div>";
    break; case 'ajaxOK':
    cnt = "<div class=\"modal-header\" style=\"height:2em;overflow:hidden;\"><button type=\"button\" class=\"close\" data-dismiss=\"modal\" aria-hidden=\"true\">×</button><h5>操作成功</h5></div><div class=\"modal-body\"><p class=\"alert alert-success\">"+obj.message+"</p></div>";
    break; default:
    cnt = "<div class=\"modal-header\" style=\"height:2em;overflow:hidden;\"><button type=\"button\" class=\"close\" data-dismiss=\"modal\" aria-hidden=\"true\">×</button><h5>出现错误</h5></div><div class=\"modal-body\"><p class=\"alert alert-error\">"+$(obj).attr('message')+"</p></div>";
    }
    m.html(cnt);
    m.modal({"backdrop":false});
    },
    'hide':function(){
    m.modal('hide');
    }
    };
    })(),
    'copyRight':'redrangon',
    'removeUploadedImage': function(_this)
    {
    $(_this).parents('.thumbuper').remove();
    }});JS代码.
      

  4.   

    return {'show':function(type,obj){
    alert(type); //加上这个,看看传入的是什么
    switch(type)
      

  5.   

    我在想,明明已经exit(json_encode($message));了。根本不会进到模板中去。
      

  6.   


    感谢版主回复..我刚试了下.加了这句代码后...如果是错误..会提示 ajax ,如果成功..依然没有反应...说明有可能没有顺利调用到JS....
    但是为什么呢?? 难道是phpmailer的影响?
      

  7.   

    顺便再补充一下...
    不用我这个JS提示也行...但是我试过了 header() ,exit()各种提示方法...就是没一个有用....不知道什么原因..
      

  8.   


    你的是ajax形式,所以header()是不会有用的。可用debug方法:首先打开php的错误提示,然后用抓包工具(或者直接firefox firebug),看看响应或者错误究竟是什么。
      

  9.   

    排查发现是  postmail 函数出了问题...phpmailer类抛出了异常中断了语句执行....
      

  10.   

    应该先判断邮件发送成功在提示吧if($this->postmail(...)){
       //提示...
    }