Ajax onSuccess 回调,但无法控制 ajax 调用
我有一个简单的 JS 函数,需要在 AJAX 调用成功时调用它,但是我对 AJAX 调用没有任何控制权,因为框架(DNN5)处理所有这些。
如何在 AJAX 成功时调用我的函数?
我使用DNN5和jQuery,如果你不熟悉DNN,就假设页面上的所有控件都包装在asp:UpdatePanel中。
谢谢。
I have a simple JS function that needs to get called when AJAX call succeeds, however i don't have any control over the AJAX calls since the framework (DNN5) handles all that.
How do i call my function on AJAX success?
I use DNN5 and jQuery, if you're not familiar with DNN, just assume that all the controls on the page are wrapped in the asp:UpdatePanel.
Thank you.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我不熟悉 DNN5,但熟悉 UpdatePanels。 您可以挂钩 ASP.NET AJAX 中异步回发的客户端事件,即向 PageRequestManager endRequest 事件添加事件处理程序。
举个例子,
编辑:
考虑一下,我不确定这是否适合您。 这取决于 DNN5 如何在 ASP.NET 中执行 AJAX 调用
I'm not familiar with DNN5, but am with UpdatePanels. Can you hook into the Client events of an async postback in ASP.NET AJAX i.e. add an eventhandler to the PageRequestManager endRequest event.
As an example,
EDIT:
Thinking about it, I'm not sure whether this will work for you. It'll depend on how DNN5 performs the AJAX calls within ASP.NET
@Russ:刚刚看到你的答案,我会测试它,如果它有效,我会接受它。
发布这个问题后不久,我想起我在之前的项目中也遇到了类似的问题,所以我回去并从那里获取了代码:
@Russ: just saw your answer, i'll test it, and if it works i'll accept it.
shortly after posting this question, i recalled that i had the similar problem in my previous project, so i went back and got the code from there: