closing the dialog from wihtin redirected page in iframe
Really am stumped by this one, I'm opening a page contiang a form with the following function :-
$(function() {
$('a.loadexternal').click(function(e) {
e.preventDefault();
var $this = $(this);
var horizontalPadding = 30;
var verticalPadding = 30;
$('<iframe id="externalSite" class="externalSite" src="' + this.href + '" />').dialog({
title: ($this.attr('title')) ? $this.attr('title') : '',
autoOpen: true,
width: 800,
height: 500,
modal: true,
resizable: true,
autoResize: true,
overlay: {
opacity: 0.5,
background: "black"
}
}).width(800 - horizontalPadding).height(500 - verticalPadding);
});
});
When the form is complete the iframe is redirected to a page called close php which has a document.ready function which should close the dialog.
Having spent many hours on this I can't produce the function which closes the dialog?
Any help much appreciated?