title: Basic DOJO 1.8: How to get a reference to a method?
body: <p>I'm am pretty new to DOJO 1.8 and would like to know how I can call a function from outside a require-method? I try to implement a message-box which fades in and out.</p>
  
  <p>I created the method:</p>
  
  <pre><code>require(["dojo/dom", "dojo/on", "dojo/domReady!" ], function(dom, on, ready) {
  
      /*function which shows a msg-box on top of the page */
      var showMsg = function(text) {
          dom.byId("msgbox").innerHTML = text;
      }     
  });
  </code></pre>
  
  <p>OK! IT works....but I no I would like to call it from somewhere else in my application:</p>
  
  <pre><code>showMsg("Item saved");
  </code></pre>
  
  <p>But that doesn't work: Uncaught ReferenceError: showMsg is not defined </p>
  
  <p>How do I get that reference?</p>
  
  <p>Thank you for your help!</p>
  
  <p>AFX</p>