English 中文(简体)
当新项目添入“共享点”日历时,起 Run功能
原标题:Running Javascript function when new items are added to a SharePoint Calendar

我需要在日历清单中列举一些事件。

I use _spbodyonloadfunctionnames.push(myFunction), but my function executes when page load.

如果我增加新的活动,这项职能就没有执行。

我怎么能想象新的事件?

最佳回答

在清单观点中执行部分要求时,可能会有一些灵敏阵列/功能,但现在我可以建议的是,将复发系统方法用于日历,这样你就可以把你的职责放在负荷活动和散装活动上。

(function(){
    var oldRefreshItems = SP.UI.ApplicationPages.CalendarContainer.prototype.refreshItems;
    SP.UI.ApplicationPages.CalendarContainer.prototype.refreshItems = function(){
        alert("I happen on every partial refresh"); // your function
        return oldRefreshItems.call(this, null);
    };
})();
问题回答

暂无回答




相关问题
selected text in iframe

How to get a selected text inside a iframe. I my page i m having a iframe which is editable true. So how can i get the selected text in that iframe.

How to fire event handlers on the link using javascript

I would like to click a link in my page using javascript. I would like to Fire event handlers on the link without navigating. How can this be done? This has to work both in firefox and Internet ...

How to Add script codes before the </body> tag ASP.NET

Heres the problem, In Masterpage, the google analytics code were pasted before the end of body tag. In ASPX page, I need to generate a script (google addItem tracker) using codebehind ClientScript ...

Clipboard access using Javascript - sans Flash?

Is there a reliable way to access the client machine s clipboard using Javascript? I continue to run into permissions issues when attempting to do this. How does Google Docs do this? Do they use ...

javascript debugging question

I have a large javascript which I didn t write but I need to use it and I m slowely going trough it trying to figure out what does it do and how, I m using alert to print out what it does but now I ...

Parsing date like twitter

I ve made a little forum and I want parse the date on newest posts like twitter, you know "posted 40 minutes ago ","posted 1 hour ago"... What s the best way ? Thanx.

热门标签