Set Status Bar Colour

SharePoint Short #1
To set the colour of a SharePoint 2010 status message, it’s important to specify it in lower-case and not start with an upper-case letter.

The MSDN page for setStatusPriColor, found here, shows the colour values starting with an upper-case letter.

So, instead of:

this.statusId = SP.UI.Status.addStatus("Custom error message", true);
SP.UI.Status.setStatusPriColor(this.statusId, "Red");

you need to do:

this.statusId = SP.UI.Status.addStatus("Custom error message", true);
SP.UI.Status.setStatusPriColor(this.statusId, "red");
This entry was posted in SharePoint Shorts and tagged , . Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *

Solve the maths problem shown below before posting: *