For lack of a better name: blog


Status alerts in SharePoint

Sometimes you want to inform your users, maybe about a network error, planned updates or so. So why not use the out of the box status function from SharePoint for this purpose? See the image for an example.



Step 1: Create a custom list

1. First we need a list named Statusalerts where we can add the alerts that need to be displayed. This list can be added everywhere in SharePoint.

2. Add 2 extra fields to this list:


Choice field, with the options: red, yellow, blue, green


Single line of text
The title field will be used for the first (bold) part of the status update, the color will define the background color and the message will be the message.

3. Add a test item.

Step 2: Create the script

clip_image0041. Download this statusalerts.txt file and add it to a document library.

2. If jQuery already is loaded on the page, remove the first line from the text file.

3. Change the *your sharepoint url* part in the txt file to your SharePoint site url where the Statusalerts list is. Please test the full url (including the /_vti_bin/lists.asmx) before proceeding.

Step 3: Load the script

1. Add a content editor webpart to the page

2. Fill in the url to the statusalerts.txt file in the content link field

3. Change the title

4. Set the chrome type to none

Step 4: Test

If evertyhing is correctly configured there should be a status bar on the page where the content editor webpart is added.


When there are multiple items all the items will be displayed with the same color:


Sources and more info?

Posted by Alexander Ketelaar

Comments (2) Trackbacks (0)
  1. Cool, to make it work in Chrome change:
    $(xData.responseXML).find(“z\\:row”).each(function() {

    $(xData.responseXML).find(“[nodeName='z:row']“).each(function() {

Leave a comment


No trackbacks yet.