Close jQuery UI Dialog from Iframe
I've implemented the following code for uploading photos inside a jQuery dialog (using an iframe). Here's the Iframe <div style="display: none"> <iframe id="upload-form" frameborder="0" marginheight="0" marginwidth="0" src="Upload.aspx"></iframe> </div> And here's the jQuery code on the parent page which takes care of opening the dialog. $("#upload-image").click(function (e) { e.preventDefault(); $('#upload-form').dialog({ modal: true, width: 300, title: "Upload Image", autoOpen: true, close: function(event, ui) { $(this).dialog('close') } }); }); I'm then injecting a script (on the iframe