O'Reilly logo

Microsoft® SharePoint® Foundation 2010 Inside Out by Penelope Coventry Errin O’Connor Troy Lanphier, Johnathan Lightfoot, Thomas Resing, and Michael Doyle

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Managing Notifications

To display a notification message, use the JavaScript SharePoint COM namespace SP.UI.Notify. Similar to the Status Bar, the content of the notify message is in HTML format; however, there is no method to modify the background color. By default, the notify message is visible for five seconds, but you can configure it to permanently display. Place the following code in the HTML Form or Content Editor Web Part on a Web Part or wiki page to display the Add Notification and Remove Notification buttons:

<script language="ecmascript" type="text\ecmascript"> var notifyId = ''; function displayNotification() { notifyId = SP.UI.Notify.addNotification( "<span style=\'background-color: yellow\'>SPFIO notify message</span>", true); } ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required