title: How to check if there is a message in the message queue of joomla 2.5?
body: <p>how can I check if there is a message in the message queue? for example how can I do something like :</p>
  
  <pre><code>&lt;script type="text/javascript"&gt;
      var message='&lt;jdoc:include type="message" /&gt;'
          if(message!="")
            {
               alert(message);
            }
  &lt;/script&gt;
  </code></pre>
  
  <p>I am using joomla 2.5. 
  Thank you</p>