2012-04-02 6 views
2
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.. 

ich im Internet nach einem Tag gesucht hatte, aber did'nt das Problem gelöst ....Ich habe ein iframe in einem modalen Dialogfeld. Kann ich die Modal-Box schließen, indem ich auf eine Schaltfläche im Feld Iframe klicke?

//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> 

/******************* * Ende der Div des modalen Dialogfelds ***********************/ Ich möchte sowohl das i-Frame als auch das modale Dialogfeld auf a schließen button click in der Datei, die im iframe aufgerufen wird .. die Datei im i-Frame ist eine externe Datei mit Tabs .. So, wie Sie das Dialogfeld und iframe auf einen Button klicken, die in der Datei definiert ist ..

//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> 

/********************* Ende des Skripts *********************/
Ich möchte sowohl das i-Frame als auch das modale Dialogfeld auf einem Button-Klick in der Datei, die im iframe aufgerufen wird, schließen. Die im i-Frame enthaltene Datei ist eine externe Datei mit Tabs. So wie schließen Sie das Dialogfeld und iframe auf eine Schaltfläche klicken, die in der Datei definiert ist ..

// so how can close the dialog and iframe on a button click 

wird jede Hilfe dankbar sein ......

Antwort

Verwandte Themen