マスターページに「利用規約」のリンクボタンがあります..クリックすると、このコードを使用してポップアップウィンドウが表示されます
Dim myScript As String
myScript = "<script>window.open('Terms.aspx?',null,'height=750, width=1024,status= no,resizable= no, scrollbars=yes,toolbar=no,location=no,menubar=no'); </script>"
ScriptManager.RegisterStartupScript(Me, Me.[GetType](), "pop", myScript, False)
I have a accept button on pop up window page on which i am closing this pop up
ClientScript.RegisterStartupScript(GetType(Page), "closePage", "window.close();", True)
問題は、このポップアップが閉じられたら親ウィンドウを更新したいということです。どうすればこれを達成できますか? これは機能しませんでしたポップアップを閉じた後に親ウィンドウを更新しています
アップデート
<div style="padding:5px 0;">
<asp:Button ID="btnAccept" runat="server" Text="Accept" OnClientClick="Refresh()" style="HEIGHT: 19px;background: #C0003B;color: white; " /> <asp:Button ID="btnReject" runat="server" Text="Reject" OnClientClick="Refresh()" style="HEIGHT: 19px;background: #C0003B;color: white;"/>
</div>
function Refresh() {
return confirm('Are you sure?');
window.onunload = refreshParent;
function refreshParent() {
window.opener.location.reload();
}
}