title: How can I close a jQuery Modal dialog with an iframe in it?
body: <p>I have a jQuery modal dialog that loads a different page on an iframe.</p>
  
  <p>The iframed page has a form in it and i'm trying to get it to close the jQuery modal dialog automatically after the user submitted the form.</p>
  
  <p>Is that even possible?</p>
  
  <p>Thanks,</p>
  
  <p>LoadModal code (on first.html):</p>
  
  <pre><code>&lt;script type="text/javascript"&gt;
  function showModal(url) {
  $(function() {
  
  
  var $this = $(this);
  var horizontalPadding = 30;
  var verticalPadding = 30;
  $('&lt;iframe id="externalSite" scrolling="no" frameborder="0" class="externalSite" src="' + url + '" /&gt;').dialog({
   title: ($this.attr('title')) ? $this.attr('title') : 'Choose your location',
   autoOpen: true,
   width: 700,
   height: 700,
   modal: true,
   resizable: true,
   autoResize: true,
   overlay: {
    opacity: 0.5,
    background: "black"
   }
  
  }).width(700 - horizontalPadding).height(700 - verticalPadding);            
  
  });
  }
  &lt;/script&gt;
  &lt;button onclick="showModal('/iframe.html');"&gt;Add&lt;/button&gt;
  </code></pre>
  
  <p>iframe code (iframe.html)</p>
  
  <pre><code>&lt;html&gt;
  &lt;body&gt;
  &lt;form action="" method="POST"&gt;
  &lt;input type="text" name="test"&gt;
  &lt;input type="submit"&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>after iframe form is submitted, I would like to close the dialog opened by first.html jQuery function.</p>