使用jQuery显示BlockUI拦截Ajax请求 [英] Intercept ajax requests with jquery to display BlockUI

查看:143
本文介绍了使用jQuery显示BlockUI拦截Ajax请求的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好, 我试图拦截Ajax请求使用jQuery,显示等待消息,就像使用插件BlockUI,但我怎么能拦截从asp.net框架提供的UpdatePanel的sended要求,就是某种方式以触发?

Guys, i'm trying to intercept ajax requests with jquery, to display a waiting message like with using plugin BlockUI, but how can i intercept requests sended by the UpdatePanel provided from asp.net framework, is some way to take the trigger?

感谢

推荐答案

您可以使用的的BeginRequest endRequest 的的PageRequestManager可以对客户端事件显示请稍候用户界面。

You can use the beginRequest and endRequest client side events of the PageRequestManager to display a "please wait" UI.

Sys.WebForms.PageRequestManager.instance.add_beginRequest(beginRequestHandler)

Sys.WebForms.PageRequestManager.instance.add_endRequest(endRequestHandler)

请参阅<一href="http://www.asp.net/AJAX/Documentation/Live/ClientReference/Sys.WebForms/PageRequestManagerClass/b865e12a-caf3-4cfd-8878-fafc0bd8b70c.aspx"相对=nofollow>这里以获取更多信息。有实例为每个事件

See here for more information. There are examples for each event.

这篇关于使用jQuery显示BlockUI拦截Ajax请求的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆