Persistant Status Bar Notification ... error 'SP.UI.Status' is null or not an object

I want to show a status bar that needs to be persistent on a page. for this I used the following in my master page
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>
ref:
http://www.zimmergren.net/archive/2010/03/17/sp-2010-dynamically-displaying-messages-to-your-users-with-the-notification-and-status-bar-areas-in-sharepoint-2010.aspx
But what I want is
to call the function on load. So I used pushed ny function to _spBodyOnLoadWrapper using _spBodyOnLoadFunctionNames.push("YourFunctionName");,
it throws an error 'SP.UI.Status' is null or not an object
Next I created and
deployed a webcontrol and did a registerclientscript, that too gives me 'SP.UI.Status' is null or not an object
// Define the name and type of the client scripts on the page.
String csname1 = "AlertScript";
Type cstype = this.GetType();
// Get a ClientScriptManager reference from the Page class.
ClientScriptManager cs = Page.ClientScript;
// Check to see if the startup script is already registered.
if (!cs.IsStartupScriptRegistered(cstype, csname1))
StringBuilder cstext1 = new StringBuilder();
cstext1.Append("<script type=text/javascript> alert('Hello World!');");
cstext1.Append("var statusId = SP.UI.Status.addStatus('title', 'message', true);");
cstext1.Append("SP.UI.Status.setStatusPriColor(statusId, 'yellow'); </");
cstext1.Append("script>");
cs.RegisterStartupScript(cstype, csname1, cstext1.ToString());
What am I missing ?
How can I get to show a status bar on load of any page, just as you get a health analyzer message when you get into the Central Admin?
Thanks, Mano
Mano Mangaldas | Blog : http://howtosharepoint.blogspot.com 

Ok, for some reason, it is not working for me. Below are the code that didnt work for me
<script type="text/javascript">
function ShowStatusBarMessage(title, message)
var statusId = SP.UI.Status.addStatus(title, message, true);
SP.UI.Status.setStatusPriColor(statusId, 'red');
ShowStatusBarMessage('Title!','Awesome message!');
</script>
This too didnt work
<script type="text/javascript">
function ShowStatusBarMessage()
var statusId = SP.UI.Status.addStatus('Some title', 'Some message', true);
SP.UI.Status.setStatusPriColor(statusId, 'red');
_spBodyOnLoadFunctionNames.push("ShowStatusBarMessage");
</script>
I did try to register client script block programatically, that too didnt work
String csname1 = "AlertScript";
Type cstype = this.GetType();
// Get a ClientScriptManager reference from the Page class.
ClientScriptManager cs = Page.ClientScript;
// Check to see if the startup script is already registered.
if (!cs.IsStartupScriptRegistered(cstype, csname1))
StringBuilder cstext1 = new StringBuilder();
cstext1.Append("<script type=text/javascript>");
cstext1.Append("var statusId = SP.UI.Status.addStatus('title', 'message', true);");
cstext1.Append("SP.UI.Status.setStatusPriColor(statusId, 'yellow'); </");
cstext1.Append("script>");
cs.RegisterStartupScript(cstype, csname1, cstext1.ToString());
Any help appreciated.
But the below code works..
<script type="text/javascript">
function ShowStatusBarMessage(title, message)
var statusId = SP.UI.Status.addStatus(title, message, true);
SP.UI.Status.setStatusPriColor(statusId, 'yellow'); /* Set a status-color */
</script>
<a onclick="ShowStatusBarMessage('Title!','Awesome message!')" href="#">
Display Status Bar message!
</a>
Thanks
mano
Mano Mangaldas | Blog : http://howtosharepoint.blogspot.com 

Similar Messages

  • Error: 'document.wwv_flow.request' is null or not an object.

    I've problems with the buttons in my Application.
    When I create one and click I after, I've allways the Error Message: Error: 'document.wwv_flow.request' is null or not an object.
    But if I create the same butten on my test application, I don't have this error message.
    Whats wrong?
    Thanks
    Dean

    Dean,
    Can you be a bit more specific? What it the difference between "my Application" and "my test application"? What are you doing differently when you are creating these buttons?

  • Error Spry.Data.XMLDataSet is null or not an object

    Hi
    I try to use a dataset and a repeat list on a site
    But it wont show the list in top. There are two javascript
    errors. One of them says Spry.Data.XMLDataSet is null or not an
    object
    Whats wrong

    This one was solved. I copied the files in SpryAsset from a
    new one, into the folder on this site. Then the problem was
    solved

  • Error 'this.node.parentNode is null or not an object' with search highlight in certain topics

    goto
    http://www.afas.nl/profithelp/2_8_2/SE/index.htm
    Click 'zoeken' (search)
    Be sure that 'Zoekresultaten markeren' (search highlight) is
    checked
    Type 'activa'
    Click the topic 'activa'
    An error is displayed in the bottom left corner:
    'this.node.parentNode is null or not an object'
    If search highlight is not used, the error is not displayed.
    Any ideas?

    I think I have it, but it's almost unbelieveable.
    In the activa topic, the word is highlighted up to a point.
    Coming to the next instance of activa, you have this code:
    <li class=p-BulletedList><p
    class=BulletedList><b><span style="font-weight:
    normal;">V:</b> v</span>aste activa waarop wordt
    afgeschreven (Dit is de standaard waarde) . . . </p>
    Note the superfluous <b> and </b> tags,
    especially with the <span> calling for normal font-weight.
    Suppose this is a valid string. Because the opening tags are
    <b><span . . .>,
    the closing sequence should be
    </span>...</b>
    I'm not sure exactly why the error does what it does.
    Perhaps this is a simple html error that happens to come in
    an awkward place, or
    Because the browser expects </span> first, it treats
    </b> as text, so the <b> never gets closed, which
    confuses the search highlight script.
    I've run into something like this before. Repeated
    application, changes and deletion of font attributes in
    approximately the same place sometimes results in confused tags.
    Similarly, when you apply a build tag to styled text, and perhaps
    change the font attribute, opening and closing tags get confused.
    It may depend on the precise locations where you started and ended
    your highlights during editing.
    You'd expect this to be a harmless html error, but in this
    case, it breaks the highlight code, I believe.
    You're in a better position to test this than I am, so I
    await your results.
    Harvey

  • BPELConsole error message: 0.prettyDate is null or not an object

    We have successfully deployed the sample approval workflow. We modified that workflow and added an email task. The workflow was deployed and it launches and completes successfully. Via the BPELConsole, we can view the "audit" for that instance. However, when we view the "flow" for that instance, we get the error message:
    Error: Internal Bug (# 81)
    '0.prettyDate' is null or not an object
    I can't find any reference to "prettyDate" (i even searched for Julia Roberts, Jessica Biel, etc) to no avail. Any ideas on what the heck this means?
    To reiterate - all we changed was to add an Email task and the process otherwise behaves as usual.
    Our BPEL install is in its own Application Server instance. It is version 10.1.3.3.
    thank you,
    iggy.

    This is a bug - I know it happend on 10.1.2.
    You need to apply patch...I don't remember the number sorry.
    Try to find it in metalink.

  • Button error - document.wwv_flow.p_request is null or not an object

    Hello
    I currently seem to be getting a page error with Internet explorer, whenever I click a button, the error is 'document.wwv_flow.p_request' is null or not an object, the button then stays disabled.
    The error doesn't seem to occur on all the pages I have created, but on most.
    Any ideas?
    Cheers ian

    I have just noticed that the problem seems to be related to the submit rather than the button itself, as the redirect buttons work, but anything that uses a submit does not work i.e select lists (with submit).
    Is this something that I can fix?

  • JavaScript Error with Tree2: NAV_COMMAND is null or not an object

    ello all,
    I am getting the following javascript error when I click on the + image to expand the root node:
    'serverTree:org.apache.myfaces.tree.NAV_COMMAND' is null or not an object
    Following is my jsp code
    <f:view>
    <h:form id="foo">
    <t:tree2 id="serverTree" value="#{productBrowser.treeData}" var="node" varNodeToggler="t" clientSideToggle="false">
    <f:facet name="productsRoot">
    <h:panelGroup>
    <t:graphicImage value="images/yellow-folder-open.png" rendered="#{t.nodeExpanded}" border="0"/>
    <t:graphicImage value="images/yellow-folder-closed.png" rendered="#{!t.nodeExpanded}" border="0"/>
    <h:outputText value="#{node.description}" styleClass="nodeFolder"/>
    <h:outputText value=" (#{node.childCount})" styleClass="childCount" rendered="#{!empty node.children}"/>
    </h:panelGroup>
    </f:facet>
    </t:tree2>
    </h:form>
    </f:view>
    I looked at the source code of HtmlTreeRenderer.java and NAV_COMMAND is defined as follows:
    private static final String NAV_COMMAND = "org.apache.myfaces.tree.NAV_COMMAND";
    I looked in the myfaces.jar and did not find anything inside this path.
    What am I missing?
    Thanks in advance.

    Dean,
    Can you be a bit more specific? What it the difference between "my Application" and "my test application"? What are you doing differently when you are creating these buttons?

  • Javascript error : 'xfa.sourceSet.nodes' is null or not an object.

    Has anyone seen this error when rendering a form in HTML while trying to make an ODBC connection with that form?
    Thanks!

    Pretty much the only ways you have with HTML are 1) Execute it on the server - must be running MS platform - using a Web Service or Data Connection or 2) use standard ADO on the client - if you can be sure your end-user is always going to be on a IE/MS platform. In the case of ADO, you are moving to a completely script orientated approach.
    Personally, I always use either a Web Service or make the call to the db before rendering the form through Form Server (i.e. prefill data into the HTML before ending it to the client)

  • Error On InfoViewApp: 'searchMenu' is null or not an object

    Hy, i have this problem: when i open My Favorites on InfoViewApp page, i receive this IE message : 'searchMenu' is null or not an object.Could you help me?
    P.S BO XI release 3.0
    Thank's  a lot.
    Sincerely yours
    Andrea Maraviglia

    This question i have posted on Business Object Administration section. Thank's

  • Error message "gReport.controls' is null or not at object"

    This comes up when on an interactive form, you select filter from the drop down and try to filter on a column.
    please help.
    Doug

    Hi Doug,
    I assume you mean "Interactive *report*" ;)
    It sounds as though either (A) the Apex javascript files are not being loaded or (B) there is some javascript (or perhaps other HTML tags) that is invalid and stopping other scripts from running properly.
    Are either of these likely?
    Andy

  • Up next doesn't seem to work properly with multiple speakers over airplay. The status bar on the computer shows the song playing, but not over airplay. When I restart the song it plays, but the same thing happens when the next song cues up. Any ideas?

    Up next doesn't seem to work properly with multiple speakers over airplay. The status bar on the computer shows the song playing, but not over airplay. When I restart the song it plays, but the same thing happens when the next song cues up. Any ideas?

    Hey briannagrace96,
    Welcome to Apple Support Communities! I'd check out the following article, it looks like it applies to your situation:
    iPod: Appears in Windows but not in iTunes
    http://support.apple.com/kb/ts1363
    You'll want to go through the following troubleshooting steps, and for more detail on each step follow the link to the article above:
    Try the iPod troubleshooting assistant:
    If you have not already done so, try the steps in the iPod Troubleshooting Assistant (choose your iPod model from the list).
    If the issue remains after following your iPod's troubleshooting assistant, follow the steps below to continue troubleshooting your issue.
    Restart the iPod Service
    Restart the Apple Mobile Device Service
    Empty your Temp directory and restart
    Verify that the Apple Mobile Device USB Driver is installed
    Change your iPod's drive letter
    Remove and reinstall iTunes
    Disable conflicting System Services and Startup Items
    Update, Reconfigure, Disable, or Remove Security Software
    Deleting damaged or incorrect registry keys
    Take care,
    David

  • Trying to create a Photomerge in Bridge, when the files open in Photoshop ( small jegs ) , I get a error message of " Unable to process latte files " / " null is not an object "

    Trying to create a Photomerge in Bridge, when the files open in Photoshop ( small jegs ) , I get a error message of " Unable to process latte files " / " null is not an object "
    Please help

    Wait a second, Photoshop can make lattes now?  Personally I prefer my coffee black, but man have I been under-utilizing this program.

  • Context Menu error: 'length' is null or not an object

    When we run some of our reports (BI 7.0) and right click on the table to display the context menu we get a javascript error in the bottom left of Internet Explorer. The context menu doesn't appear.
    Once you expand the error is  'length' is null or not an object. It doesn't affect all the reports in fact so far we've only discovered 2 reports with this problem although there may be more.
    The reports with problems have had their own individual web templates developed. We haven't developed much of our own Javascript via the script web item and definitely none that would affect the context menu. The only code we have opens help pages/useful web pages/other apps etc. via buttons.
    None of the reports shows an error when you validate in the WAD software.
    We are currently using IE6 (upgrading to IE8 soon) and we have recently applied SP21 on the Java Stack.

    Hi Fred
    Did SAP come back with an OSS note to correct this issue. I am not finding anything in the Service marketplace.
    Thanks
    Adrian

  • 'schInternalColumn' is null or not an object - Error in DIS

    Hi all..
    When I am going to paste any document in DIS, " 'schInternalColumn' is null or not an object " this error comes with check in page...
    What is the issue behind this...Please help me..
    Regards
    Yogita

    Hi Yogita ,
    This issue has got introduced from 0717 patchset that is provided for UCM server , it is already fixed and a patch will be released for the same soon .
    You can select OK (I think it shows up around 7 times) and continue with the operations on DIS . It does not break any functionality .
    Thanks
    Srinath
    Edited by: Srinath Menon on Sep 5, 2012 12:54 PM

  • Please help!!  error: __EventTarget is null or not an object

    Hi,
    I am developing the business charts with dropdownlist in ASP.NET for our new plumtree portal.
    The portlets are working perfectly in the VS.NET dev environment, However, whenever I change the selection in the dropdownlist, it doesn't post back but I got an IE error which appears with a little yellow warning sign on the lower left corner of the IE window, which means, the error is on client side.
    The error : '_EVENTTARGET' is null or not an object .
    I have a feeling that there's something wrong with the javascript behind the sceen when ASP.NET controls try to plug in Plumtree web pages. Since I don't know how to access those Plumtree javascripts, can someone help me out here!!
    (If I right click on the web page to get the source code, here's what I found :
    <input type="hidden" name="__EVENTTARGET" value="" />
    <input type="hidden" name="__EVENTARGUMENT" value="" />
    <input type="hidden" name="__VIEWSTATE" value="...................." />
    <script language="javascript" type="text/javascript">
    <!--
         function __doPostBack(eventTarget, eventArgument) {
              var theform;
              if (window.navigator.appName.toLowerCase().indexOf("microsoft") > -1) {
                   theform = document.Form1;
              else {
                   theform = document.forms["Form1"];
              theform.__EVENTTARGET.value = eventTarget.split("$").join(":");
              theform.__EVENTARGUMENT.value = eventArgument;
              theform.submit();
    // -->
    </script>
    Thank you in advance.

    I was also running in the same issue with slightly different settings/environment.
    I had couple of portlets written in .Net on one page. One was written in .Net 1.1 and other one was .Net 3.5 with Ajax Extender controls. (Both the apps run fine without portal - ALUI 6.1 environment)
    Couple of the link buttons were generating the same error '__EVENTTARGET' is null or not an object , these link buttons were trigger to an update panel.
    I tried registering the __EVENTTARGET with the link buttons from the code behind, making the form names same ... .. but nothing helped.
    In my case I had to change the asp:LinkButton to asp:Button to avoid __EVENTTARGET generation for the controls.
    __EVENTTARGET is only generated for autopostback controls (or in other words controls that do not have submit behavior by default). It is not required for asp:Button.
    HTH!
    Avinash
    Edited by asolvent at 03/12/2008 4:08 PM

Maybe you are looking for

  • How to Make DataGrid configured to act only on a Specific column only a Row

    Hi, I am having a DataGrid which has been populated with a search result data from DataBase . Say for example  CustomerID         Name             Email 100                       Ravi              [email protected]   Now my requirement is When the us

  • Render out a blend mode

    is there any way to render out a blend mode layer so when it's on normal it still looks like the blend mode with the transparency etc... I want to export some design to .png files to use in a web page, and I need the blend mode to work with out the p

  • Patterns and Regular Expressions

    HI I am trying to search a string for words and return the count word : are String: are , we care about this. i get back count 2. It counts are and also care. but the count should be one. How can i limit the matcher to find only 'are' do a exact word

  • Starting WebLogic Commerce as an NT Service

    Hi. I have tried running the WebLogicCommerce Server as an NT service, using the wlservice from the weblogic/bin directory, and setting correctly the environment properties needed for running the commerce. It seems to start.... When I run the portal

  • Can't activate 7342 Motion Controller

    Hello, My disk drive crashed and I had to reinstall WindowsXP, service packs, security updates, etc.  Afterward, I reinstalled the NI-Motion software that came with my PCI-7342 (3-4 years old).  However, MAX didn't recognize that the 7342 was install