How to Show Status Message in SharePoint 2013?

Requirement: After the launch of new SharePoint intranet portal, we wanted to display a status message in each page.

Solution: Here is the script to display status message using SharePoint Javascript client side object model.
<script type="text/javascript">
ExecuteOrDelayUntilScriptLoaded(AddStatusMessage, "sp.js");

function AddStatusMessage()
var statusID = SP.UI.Status.addStatus("Welcome","Welcome to New Crescent Portal. Feel free to contact <a href='mailto:[email protected]'>Helpdesk </a> if you have any queries");

SP.UI.Status.setStatusPriColor(statusID, 'green');

and the result of SharePoint 2013 status message:
sharepoint 2010 status message
This script can be used in Master pages or in Script editor web parts.

No comments:

Please Login and comment to get your questions answered!

Powered by Blogger.