title: I have a iframe inside a modal dialog box. Can I close the Modal box by clicking on a button inside the filed called in a Iframe..?
body: <pre><code>I want to close both the i frame as well as the modal dialog box on a button click present inside the file which is called in the iframe.. the file included in the i frame is an external file having tabs.. So how to close the dialog box and iframe on a button click which is defined in the file..
  </code></pre>
  
  <p>I had searched the net for days but did'nt solved the problem....</p>
  
  <pre><code>//My Code for the iframe for and modal dialog box is as follows..
  
  
  I want to close both the i frame as well as the modal dialog box on a button click present inside the file which is called in the iframe.. the file included in the i frame is an external file having tabs.. So how to close the dialog box and iframe on a button click which is defined in the file..
  
  // here is the code for i frame
  
  &lt;div id="dialog_with_tabs" title="Vehicle Selection"&gt;// div of modal dialog
  &lt;div id="tabs_in_dialog"&gt;
  &lt;ul&gt;
  &lt;/ul&gt;
  &lt;iframe id="myframe"  src="add.php" width="100%" height="400" frameborder="0" scrolling="auto" seamless="seamless"&gt;  /// here i have included a file which has tabs..
  &lt;/iframe&gt;  /*****************End of Iframe*********************/
  
  &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>/********************End of Div of Modal Dialog box***********************/
       I want to close both the i frame as well as the modal dialog box on a button click present inside the file which is called in the iframe.. the file included in the i frame is an external file having tabs.. So how to close the dialog box and iframe on a button click which is defined in the file..</p>
  
  <pre><code>//code for modal dialog box popup is as follows..
  
  &lt;script type="text/javascript" &gt;           //script for modal dialog
  $("#dialog_with_tabs").dialog({
  bgiframe: true,
  autoOpen: false,
  height: 400,
  width: 700,
  modal: true,
  buttons: {
  
  }
  });
  
  $("#dialog_with_tabs").bind('dialogopen', function() {
  /* init tabs, when dialog is opened */
  
  $("#tabs_in_dialog").tabs();
  });
  $("#dialog_with_tabs").bind('dialogclose', function() {
  /* your function */
  window.location.reload(true);
  /* destroy tabs to avoid problems on re-open */
  $("#tabs_in_dialog").tabs('destroy');
  /* destroy dialog to avoid problems on re-open */
  $("#dialog_with_tabs").tabs('destroy');
  });
  /* your function to open the dialog */
  $('#tabtest').click(function() {
  $('#dialog_with_tabs').dialog('open');
  }) 
  //$("#dialog_with_tabs").dialog('open'); //  opens the modal dialog
  &lt;!-- jquery part --&gt;
  &lt;/script&gt;
  </code></pre>
  
  <p>/*********************End of script*********************/<br>
      I want to close both the i frame as well as the modal dialog box on a button click present inside the file which is called in the iframe.. the file included in the i frame is an external file having tabs.. So how to close the dialog box and iframe on a button click which is defined in the file..</p>
  
  <pre><code>// so how can close the dialog and iframe on a button click
  </code></pre>
  
  <p>any help will be appreciated......</p>