Sharepint Status Bar and Notification

(Javascript)
Status Bar: SP.UI.Status.addStatus
Notification: SP.UI.Notify.addNotification

To display the status bar :
(From Tobias Zimmergren)

JavaScript:

function ShowStatusBarMessage(title, message) {
var statusId = SP.UI.Status.addStatus(title, message, true);
SP.UI.Status.setStatusPriColor(statusId, ‘yellow’); /* Set a status-color */
}

HTML, call the JS method:

<a onclick=”ShowStatusBarMessage(‘Title’!’,’Awesome message!’)”>
Display Status Bar message!
</a>

To display Notification:

JavaScript:

function ShowNotificationMessage(tooltip, message, sticky) {
SP.UI.Notify.addNotification(message, sticky, tooltip, null);
}

HTML, call the JS method:

<a onclick=”ShowNotificationMessage(‘I am cool!’,’This is a cool message’,false)”>
Display Notification!
</a>

Advertisements
Post a comment or leave a trackback: Trackback URL.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: