title: Setting max height of a dialog, then allow scrolling
body: <p>I can't seem to understand how to set the height correctly for the jquery ui dialog.</p>
  
  <p>I want it to display the height to however much content is present, but if it exceeds 400 pixels, then I want a scroll bar.</p>
  
  <p>So, if the content has 200 pixels in height, then the dialog should have a height of 200 pixels.</p>
  
  <p>If the content has a height larger than 400 pixels, then the dialog shouldn't expand past 400 pixels and a scroll bar should be visible.</p>
  
  <p>I have this so far:</p>
  
  <pre><code>$("#popup").dialog({
              modal: true,
              autoOpen: false
  
  });
  </code></pre>