Tuesday, February 26, 2013
I have looked at many examples of inserting an iframe into a jQuery UI dialog and have had little success. Then I came across this blog post describing a method that works… function showDialog(){ $("#divId").html('').dialog("open"); $("#modalIframeId").attr("src","http://www.google.com"); return false; } $(document).ready(function() { $("#divId").dialog({ autoOpen: false, modal: true, height: 500, width: 500 }); }); HTML: Show the Dialog
To close a dialog within the iframe use: $(parent.document).find('.ui-dialog'); window.parent.$('#dialogIDname').dialog('close');0 Comments:
Subscribe to:
Post Comments (Atom)