I have some code that creates a new status bar but it just stays on top without fading. It doesn't even have an 'x' to close it manually. The following is how I am adding a new SP status from code behind. How can I make this fade out after a couple seconds? jQuery? Am I missing an argument that allows the status to be closed?
var scriptTemplate = @"
ExecuteOrDelayUntilScriptLoaded(function(){{
ExecuteOrDelayUntilScriptLoaded(function(){{
var statusId = SP.UI.Status.addStatus('{0}');
SP.UI.Status.setStatusPriColor(statusId, '{1}');
setTimeout(function(){SP.UI.Status.removeStatus(statusId);}, 2000);
}},
'core.js'
)}},
'sp.js'
);";
var script = string.Format(scriptTemplate, message.Replace("\"", "\\\""), color);
Page.ClientScript.RegisterClientScriptBlock(typeof(MyTrainingUserControl), "notifysuccess", script, true);