title: JavaScript function to get the next date from a calendar
body: <p>Have multiple registered calendars in my database, each calendar has Its characteristic.</p>
  
  <p>I have a screen that the inclusion of a file and via a dropdown I choose the schedule that the frequency of this file will respect.</p>
  
  <p>Ex .: Daily, Weekly, Monthly and etc ..</p>
  
  <p>The idea is when the user clicks on a specific textbox, a message appears indicating the next available date for the file.</p>
  
  <p>Ex. Today is the 28th.</p>
  
  <p>Balloon: "The next date is 04/29/2015 day" if the frequency is daily.</p>
  
  <p>Can you help me build this function with JavaScript?</p>
  
  <p>I tried to use the code below, but my main question is how to return the next date in the calendar function</p>
  
  <p>Code:</p>
  
  <pre><code>function ShowTip(obj, msg, useBottom, maxWidth){
      try
      {
      window.status = msg;
      var msgTip = document.getElementById('msgTip');             
  
      if(msgTip)
      {
          msgTipText.innerHTML = msg;
          msgTip.style.zIndex = 9999;
          msgTip.style.left = obj.getClientRects()[0].left + document.body.scrollLeft - 2;
          msgTip.style.display = 'block';
          if (maxWidth != null)
              if (msgTip.offsetWidth &gt; maxWidth) msgTip.style.width = maxWidth;
          if (useBottom)
              msgTip.style.top = obj.getClientRects()[0].bottom + document.body.scrollTop;
          else
              msgTip.style.top = obj.getClientRects()[0].top + document.body.scrollTop - msgTip.offsetHeight - 4;
      }
  }
  catch(e) {} 
  }
  </code></pre>