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="textecmascript">
   var notifyId = '';
   function displayNotification() {
      notifyId = SP.UI.Notify.addNotification(
       "<span style='background-color: yellow'>SPFIO notify message</span>",
       true);
   }
   function removeNotification() {
      SP.UI.Notify.removeNotification(notifyId);
      notifiyId = '';
   }
</script>

<p>Click to display Notification message</p>
<p><input id=bAddNotify onclick="displayNotification()"
   type="button" value="Add Notification" /></p>
<p>Click to remove Notification message</p>
<p><input id=bRemoveNotify onclick="removeNotification()"
   type="button" value="Remove Notification" /></p>
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset