title: sap.m.MessageBox.confirm working sap.m.MessageBox.error or sap.m.MessageBox.warning not working
body: <p>In my sapui5 project i am using <code>sap.m.MessageBox.confirm</code> its working fine but when i use <code>sap.m.MessageBox.error</code> or <code>sap.m.MessageBox.warning</code> it shows error </p>
  
  <pre><code>Uncaught TypeError: undefined is not a function
  </code></pre>
  
  <p>I have added <code>jQuery.sap.require("sap.m.MessageBox");</code> still the issue is not solved. please give solution for this problem</p>
  
  <p>Thanks</p>
  
  <p>Sorry for not posting the code earlier</p>
  
  <p><strong>Edited 1</strong></p>
  
  <p><strong>View</strong></p>
  
  <pre><code> &lt;core:View xmlns:core="sap.ui.core" xmlns:mvc="sap.ui.core.mvc" xmlns="sap.m"
          controllerName="trial.S1" xmlns:html="http://www.w3.org/1999/xhtml"&gt;
      &lt;Page title="Title"&gt;
          &lt;content&gt;
  
          &lt;/content&gt;
          &lt;footer&gt;
              &lt;OverflowToolbar&gt;
                  &lt;ToolbarSpacer /&gt;
                  &lt;Button id="errorId" text="Error" type="Accept"
                      press="fnOnerror" /&gt;    
                      &lt;Button id="confirmId" text="Confirm" type="Accept"
                      press="fnOnconfirm" /&gt;  
              &lt;/OverflowToolbar&gt;
          &lt;/footer&gt;
      &lt;/Page&gt;
  &lt;/core:View&gt;
  </code></pre>
  
  <p><strong>Conroller</strong></p>
  
  <pre><code>jQuery.sap.require("sap.m.MessageBox");
  sap.ui.controller("trial.S1", {
      fnOnerror : function(oEvent){
  
           sap.m.MessageBox.error("My error message");
  
      },
      fnOnconfirm : function(oEvent){
          sap.m.MessageBox.confirm("My Confirm message")
      }
  
  });
  </code></pre>
  
  <p><strong>index.html</strong></p>
  
  <pre><code>&lt;!DOCTYPE HTML&gt;
  &lt;html&gt;
      &lt;head&gt;
          &lt;meta http-equiv="X-UA-Compatible" content="IE=edge"&gt;
          &lt;meta http-equiv='Content-Type' content='text/html;charset=UTF-8'/&gt;
  
          &lt;script src="resources/sap-ui-core.js"
                  id="sap-ui-bootstrap"
                  data-sap-ui-libs="sap.m"
                  data-sap-ui-theme="sap_bluecrystal"&gt;
          &lt;/script&gt;
          &lt;!-- only load the mobile lib "sap.m" and the "sap_bluecrystal" theme --&gt;
  
          &lt;script&gt;
                  sap.ui.localResources("trial");
                  var app = new sap.m.App({initialPage:"idS11"});
                  var page = sap.ui.view({id:"idS11", viewName:"trial.S1", type:sap.ui.core.mvc.ViewType.XML});
                  app.addPage(page);
                  app.placeAt("content");
          &lt;/script&gt;
  
      &lt;/head&gt;
      &lt;body class="sapUiBody" role="application"&gt;
          &lt;div id="content"&gt;&lt;/div&gt;
      &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>