title: How to close an iframe from inside that iframe
body: <p>I have a an iframe with content from another PHP page on my server inside a modal window. I would like to figure out a way how to close the modal box with the iframe from inside the iframe.</p>
  
  <p>I am using this modal window plugin: <a href="http://opensource.steffenhollstein.de/templates/modalbox/" rel="nofollow noreferrer">http://opensource.steffenhollstein.de/templates/modalbox/</a></p>
  
  <p>According to the documentation this method closes the modal window:</p>
  
  <pre><code>jQuery.fn.modalBox.close();
  </code></pre>
  
  <p>If I put it inside the iframe like this:</p>
  
  <pre><code>&lt;script type="text/javascript" src="jquery.js"&gt;&lt;/script&gt;
  &lt;script type="text/javascript" src="jquery.modalbox-1.0.9/js/jquery.modalbox-1.0.9-min.js"&gt;&lt;/script&gt;
  &lt;script type="text/javascript"&gt;
      //&lt;!--
  $(document).ready(function() {
  
      $('.closeModalBox').click(function() {
          jQuery.fn.modalBox.close();
      });
  
  });    //--&gt;
  &lt;/script&gt;
  </code></pre>
  
  <p>I have an input with the class .closeModalBox in the iframe:</p>
  
  <pre><code>&lt;input type="submit" name="zrusPridatElearningKurz" id="zrusPridatElearningKurz" value="Storno" class="input-submit closeModalBox" /&gt;
  </code></pre>