By EricHarlan Published: May 11, 2008 Updated: May 11, 2008
Dynamic Content Tip for MOSS
by - Chris Rivera
Description:
Have you ever needed to display content which can change without having to refresh the entire page or to have the change occur automatically and without having to make the user click any buttons? If so the following document describes a SUPER easy way to achieve this in a matter of minutes.
Background:
The following solution uses DHTML to display the dynamic content. Don’t be scared if you don’t know DHTML because the steps below are so easy to configure that they can be performed by almost anyone. Visit DynamicDrive (http://www.dynamicdrive.com/dynamicindex17/) for an easy list of effects which you can use with this solution.
Example:
The following example will illustrate how to create a simple box of data, either of text or pictures, which changes automatically and without refreshing the entire page. To follow along with this example, please refer to the following link from DynamicDrive where this code is copied from. This link also provides an example of what the code will end up looking like: http://www.dynamicdrive.com/dynamicindex17/featuredcontentslider.htm
Steps for creating dynamic content in MOSS:
Create a document library and upload any of the necessary external files. In this example we have the following files which need to be uploaded:
contentslider.css
contentslider.jsloading.gif
Drop a Content Editor Web Part on the page.
Copy the head code and insert this into the Content Editor Web Part by selecting “Source.”
Copy the body code and insert this after the head code in the Content Editor Web Part by selecting “Source.”
Make sure to provide the right path to any external files. In our example I had to change the following:
| Location |
From |
To |
| Head code |
href="contentslider.css" |
href="/Shared%20Documents/contentslider.css" |
| Head code |
src="contentslider.js" |
src="/Shared%20Documents/contentslider.js" |
| contentslider.js |
src='loading.gif |
src="/Shared%20Documents/loading.gif |
6) Automating the change is just a matter of passing in a correct variable to the ContentSlider function. Details of this can be found on the DynamicDrive website where the code was downloaded from.
7) The code can easily be edited to hold text or display pictures. Pictures can be stored in document library and referenced in the code. Details on editing the content can be found on the DynamicDrive website where the code was downloaded from. |