关闭IFrame形成另一页 [英] Close IFrame form another page
问题描述
按钮点击事件我通过IFrame调用另一个页面。
< pre lang =Javascript> function ShowIFrame(){
var modal = $ find( newtest);
$( #dialog)。empty();
$( #dialog)。append( < iframe frameborder ='0'sandbox ='allow-top-navigation'target ='_ Parent'eamless ='seamless'width ='100%' height ='100%'src ='ForgetPassword.aspx'>< / iframe>);
modal.show();
}
点击调用页面中的按钮点击事件(ForgetPassword.aspx)我想关闭上面的IFrame。
我试过这个。
ScriptManager.RegisterClientScriptBlock( this ,GetType(), 身份验证类型, javascript: function(){window.parent.document.getElementById('dialog')。visible = false;}, true );
但这对我不起作用。请帮忙。
提前致谢
find( newtest);
( #dialog)。empty();
( #dialog)。append( < iframe frameborder ='0'sandbox =' allow-top-navigation'target ='_ Parent'eamless ='seamless'width ='100%'height ='100%'src ='ForgetPassword.aspx'>< / iframe>);
modal.show();
}
点击调用页面中的按钮点击事件(ForgetPassword.aspx)我想关闭上面的IFrame。
我试过这个。
ScriptManager.RegisterClientScriptBlock( this ,GetType(), 身份验证类型, javascript: function(){window.parent.document.getElementById('dialog')。visible = false;}, true );
但这对我不起作用。请帮忙。
提前致谢
Hi,
On Button click event I am calling another page through IFrame.
function ShowIFrame() {
var modal = $find("newtest");
$("#dialog").empty();
$("#dialog").append("<iframe frameborder='0' sandbox='allow-top-navigation' target='_Parent' seamless='seamless' width='100%' height='100%' src='ForgetPassword.aspx'></iframe>");
modal.show();
}
On button click event in the calling page(ForgetPassword.aspx) I want to close the above IFrame.
I have tried this.
ScriptManager.RegisterClientScriptBlock(this, GetType(), "Authentication Type", "javascript:function(){window.parent.document.getElementById('dialog').visible = false;}", true);
But it's not working for me. Please help.
Thanks in advance
find("newtest");
("#dialog").empty();
("#dialog").append("<iframe frameborder='0' sandbox='allow-top-navigation' target='_Parent' seamless='seamless' width='100%' height='100%' src='ForgetPassword.aspx'></iframe>"); modal.show(); }
On button click event in the calling page(ForgetPassword.aspx) I want to close the above IFrame.
I have tried this.
ScriptManager.RegisterClientScriptBlock(this, GetType(), "Authentication Type", "javascript:function(){window.parent.document.getElementById('dialog').visible = false;}", true);
But it's not working for me. Please help.
Thanks in advance
这篇关于关闭IFrame形成另一页的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!