关闭IFrame形成另一页 [英] Close IFrame form another page

查看:56
本文介绍了关闭IFrame形成另一页的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述





按钮点击事件我通过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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆