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); } ...

Get Microsoft® SharePoint® Foundation 2010 Inside Out now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.