If I open a dialog like so:
$('<iframe id="externalSite" class="externalSite" src="http://www.example.com" />').dialog({
autoOpen: true,
width: 800,
height: 500,
modal: true,
resizable: true
})
How can I close the dialog from withing the iframe?
OK so I put the iframe on the page with display set to none. I open it like this:
$('#externalSite').dialog({ ... });
on the main parent window I have a function like this:
function closeIframe()
{
$('#externalSite').dialog('close');
return false;
}
From within the iframe I call:
window.parent.closeIframe();
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With