Sharepoint 2010 在 jquery/javascript 中捕获 web 部件刷新
我有一个从仪表板设计器生成的共享点页面,其中包含一些记分卡 Web 部件。在 Sharepoint 2010 中,它们通过 ajax 加载和刷新。如何捕获记分卡完全加载或刷新的时间?我有一些 jquery 在记分卡完全加载之前无法执行。但我不知道在哪里放置 onload 事件,例如,或者如何捕获 ajax 成功回调。
非常感谢。
I have a sharepoint page, generated from Dashboard Designer, with some scorecard webparts. In Sharepoint 2010, they are loaded and refreshed with ajax. How can I capture when a scorecard is fully loaded or refreshed? I have some jquery that cannot execute until the scorecards are fully loaded. But I dont know where to place an onload event, for example, or how to capture the ajax success callback.
Thanks very much.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
为了实现类似的目标,我使用了这种方法:
在此处查看更多详细信息:
http://msdn.microsoft.com/en-us/library/bb383810。 aspx
首先在这里回答类似的问题:将事件附加到超链接点击在更新面板内?
这应该可以帮助您开始。您可能需要添加几个警报,以确保您知道页面通过 AJAX 发送/接收数据的频率。您可能需要更具体地定位此目标,以防止您的 Javascript 从页面上发生的其他 AJAX 事件中执行。我猜你很久以前就已经超越了这个问题,但我想我还是会尝试回答这个问题。 GL。
To accomplish a similar goal I used this approach:
Look here for more details:
http://msdn.microsoft.com/en-us/library/bb383810.aspx
Similar question answered here first: Attach event to hyperlink click inside update panel?
This should get you started. You may want to throw in a couple alerts to make sure you know how often the page is sending/receiving data via AJAX. It's possible you may need to target this more specifically to keep your Javascript from executing from some other AJAX thing happening on the page. I'm guessing you've moved beyond this long ago, but figured I'd try to answer it anyway. GL.
您可以确定是否加载了所有 Web 部件。这是链接!提供解决方案。
You can deteremine if all the webparts are loaded. Here's a link! to provide a solution.