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

Using the Status Bar

To display, change, append a message on the Status Bar, and close the Status Bar, use the JavaScript SharePoint COM namespace SP.UI.Status. To display and then remove the Status Bar, use JavaScript functions similar to the following code:

<script language="ecmascript" type="text\ecmascript">
   var statusId = '';
   function displayStatusBar() {
      statusId = SP.UI.Status.addStatus("SPFIO Status Bar Title",
       "SPFIO message text", true)
      SP.UI.Status.setStatusPriColor(statusId, 'red');
   }
   function removeStatusBar() {
      SP.UI.Status.removeStatus(statusId);
      statusId = '';
   }
</script>

The addStatus method takes three parameters, the status message title, the content of the status message, and whether the status message appears at the beginning ...

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