开发者

Sharepoint Content Editor Webpart changing content

In my document library I have a number of HTML files with the calender month on them (e.g. July 2011.htm, August 2011.htm through to December 2012). I have a Content Editor webpart that displays the HTML file for the current month. At the moment I am manually changing the Content Link of the webpart every month to display the new content - is there some way of doing this automatically using script. I do not have Sharepoint Designer, and am on Sharepo开发者_运维问答int 2007


Use getMonth() method of javascript to get the current month.

http://www.w3schools.com/jsref/jsref_getmonth.asp

Once you have the month, you can append it with the location of your html file and output the link. Note that you can also put the javascript in CEWP web part:

http://sharepointsolutions.blogspot.com/2007/07/adding-javascript-to-content-editor-web.html

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜