The status script functions are listed out in the SP.UI.Status class. in SP.js which is added in master page by default.
The SP.UI.Status class has 6 functions.
- addStatus: used to add the status bar information.
- appendStatus: used to append the information.
- removeAllStatus: remove all status.
- removeStatus: remove status.
- setStatusPriColor: used to set color for the status bar information.
- updateStatus: update / replage the status information.
So simply follow the steps to add the information / warning in SharePoint site.
- Add a Script Editor / Content editor web part in the page,

- Edit snippet and add the below code to show the information.
- <script>
- window.onload = function()
- {
- var Status;
- Status = SP.UI.Status.addStatus("Information : ", "<imgsrc='/_Layouts/Images/STS_ListItem_43216.gif' align='absmiddle'><font color='#AA0000'>We sincerely apologize for the inconvenience.Our site is currently undergoing maintenance and upgrades and will return return shortly.</font>", true);
- SP.UI.Status.setStatusPriColor(Status, "yellow");
- }
- </script>
- Save the page and refresh.
Now the page looks as below,

Woo hoo , Now it’s very simple to show the notification for alerts/ warnings in SharePoint site.
For more info, refer https://goo.gl/45xmbX
Refer the article here in my personal blog.


Prashant VermaPosted Mar 7, 2016, 10:39 PM EST
great.. very useful.
Gowtham RajamanickamTOP 100Posted Mar 3, 2016, 8:35 PM EST
Good one..
Sakthiram DPosted Mar 1, 2016, 11:25 PM EST
Yes , we can change the icon ./_layouts/images/STS_ListItem_43216.gif/_layouts/images/cell-error.png /_layouts/images/CNSINF16.GIF /_layouts/images/DeployReportWarning.gif /_layouts/images/tridownblue.gif /_layouts/images/ERRLG.GIF /_layouts/images/docencryptionhh.png /_layouts/images/docencryption.png /_layouts/images/EMMCopyWChildren.png /_layouts/images/error32by32.gif /_layouts/images/warning32by32.gif
Vipin TyagiPosted Mar 1, 2016, 9:26 PM EST
Where to find /_Layouts/Images/STS_ListItem_43216.gif in O365.
Vipin TyagiPosted Mar 1, 2016, 9:21 PM EST
Nice article. Can we change the icon as well?