Looking for something?

Author: Tobias Zimmergren
http://www.zimmergren.net | http://www.tozit.com | [@zimmergren](http://www.twitter.com/zimmergren


With the new version of SharePoint comes a full set of new and awesome features that you’ll have to indulge and learn. One of the small things that makes my day much more fun is to display messages to your users in the Status- and Notification areas.

Example of a message in the Status bar area: image

Example of a message in the Notification area: image

How do we make this magic happen?

In order to display these messages, you really (really) don’t need a lot of code. I’ll lay out the simple code I used to display the messages you saw in my screenshots.

It’s all JavaScript based, so get ready to dig out those old JS skills you know you’ve got lying around somewhere ;-)

Oh wait, you don’t need skills to do this, it’s just that easy!

Show me a Status bar!

*JavaScript: * function ShowStatusBarMessage(title, message) {     var statusId = SP.UI.Status.addStatus(title, message, true);     SP.UI.Status.setStatusPriColor(statusId, ‘yellow’); /* Set a status-color */ }

*HTML, call the JS method: *     Display Status Bar message!

Show me a Notification popup!


function ShowNotificationMessage(tooltip, message, sticky) {     SP.UI.Notify.addNotification(message, sticky, tooltip, null); }

*HTML, call the JS method: *    Display Notification!


Actually, there’s no need for a summary. It’s way too easy.


0 Comments 17 March 2010
Tobias Zimmergren

Tobias Zimmergren

Hi, I'm Tobias Zimmergren. I am a Microsoft MVP for SharePoint and I use this site to share my thoughts on tech with you on topics like SharePoint, Office 365, Azure and general web development.

  Malmö, Sweden

Related Post

Comments powered by Disqus

Sign up to my e-mail newsletter to get news about Azure, SharePoint and Office 365 and get instant notifications when I publish new posts!

Enter valid email