加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 站长学院 > PHP教程 > 正文

php – 在jQuery中触发Zend FlashMessenger

发布时间:2020-12-13 13:16:22 所属栏目:PHP教程 来源:网络整理
导读:我正面临一个问题,我想知道是否有人可以指出我正确的方向. 我在我的控制器中使用Zend的FlashMessenger,但在我的一个文件中,我通过AJAX帖子处理我的表单.在这种情况下,我认为Humane-flatty将是Zend FlashMessenger的一个很好的替代品,但它的布局完全不同. 有
我正面临一个问题,我想知道是否有人可以指出我正确的方向.

我在我的控制器中使用Zend的FlashMessenger,但在我的一个文件中,我通过AJAX帖子处理我的表单.在这种情况下,我认为Humane-flatty将是Zend FlashMessenger的一个很好的替代品,但它的布局完全不同.

有没有办法在我的AJAX帖子中触发Zend Flashmessenger?

这就是我目前在控制器中调用Zend FlashMessenger的方法:

$this->_helper->FlashMessenger(array('success' => 'Succesfully added'));

这是我的jQuery:

if (data.weight !== '' && data.customer != '') {
   $.ajax({
     type: 'POST',url: '/index/line',data: data,success: function(res) {
       $('#open_orders').append(res);
       flashSucces.log('Orderline succesfully added.');
       //Can I call Zend flashmessenger from here?
     }
   });
}



The page is not found

nginx error!

The page you are looking for is not found.

Website Administrator

Something has triggered missing webpage on your
website. This is the default 404 error page for
nginx that is distributed with
Fedora. It is located
/usr/share/nginx/html/404.html

You should customize this error page for your own
site or edit the error_page directive in
the nginx configuration file
/etc/nginx/nginx.conf.

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读