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..
我已經搜查了淨幾天,但did'nt解決了這個問題....我在模態對話框中有一個iframe。我可以通過點擊Iframe中調用的字段中的按鈕來關閉Modal框嗎?
//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
<div id="dialog_with_tabs" title="Vehicle Selection">// div of modal dialog
<div id="tabs_in_dialog">
<ul>
</ul>
<iframe id="myframe" src="add.php" width="100%" height="400" frameborder="0" scrolling="auto" seamless="seamless"> /// here i have included a file which has tabs..
</iframe> /*****************End of Iframe*********************/
</div>
</div>
/******************* *模態對話框的結尾***********************/ 我想關閉i框以及模態對話框按鈕單擊存在於iframe中調用的文件內..i框架中包含的文件是一個帶有選項卡的外部文件。所以如何關閉對話框和iframe上的一個按鈕,這是在文件中定義的。
//code for modal dialog box popup is as follows..
<script type="text/javascript" > //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
<!-- jquery part -->
</script>
/*********************腳本結束*********************/
我想關閉i框以及按鈕上的模式對話框,點擊存在於iframe中調用的文件內..i框架中包含的文件是一個具有選項卡的外部文件..所以如何關閉對話框和iframe在其上的文件中定義的按鈕點擊..
// so how can close the dialog and iframe on a button click
任何幫助將不勝感激......