Reputation: 97
I am Popup External url Page inside my current page using jQueryDialogue and Iframe
var iframe = $('<iframe frameborder="0" id="FrameCust" marginwidth="0" marginheight="0" allowfullscreen></iframe>');
var dialog = $("<div id='tempstep'></div>").append(iframe).appendTo("body").dialog({
autoOpen: false,
modal: true,
resizable: false,
width: "auto",
height: "auto",
close: function () {
iframe.attr("src", "");
}
});
$("input[id$='btnAddCust']").on("click", function AddCust(e) {
e.preventDefault();
var src = "../MasterPages/CustomerMaster.aspx?lpopup=True";
var title = "Customer Master";
var width = "980";
var height = "530";
iframe.attr({
width: +width,
height: +height,
src: src
});
dialog.dialog("option", "title", title).dialog("open");
});
In my customer master Codebehind File Checking Query string to Identifiey the page from Popup or Itself (lpopup='True') I want to Close the PopupDialogue after click Save button inside the PopupDialogue (In the External Url) how can i do that ?
Upvotes: 0
Views: 1196
Reputation: 2788
You can pass query string in parent page from code behind of popup page using code below. This will also close the popup.
Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "jain", "<script type='text/javascript' language='javascript'>parent.location.replace('../test.aspx?Q=123456');</script>");
Upvotes: 2