加载子页面时禁用父页面 [英] Disabling parent page when child page is loaded

查看:79
本文介绍了加载子页面时禁用父页面的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

我正在开发webApplication(Framework 4.0).我有2页
1.Page1.aspx
2.Page2.aspx

在我的Page1.aspx中,我有一个按钮.当我按下按钮page2.aspx时,它将作为一个单独的小窗口打开(使用javascript"window.open(''page2.aspx")).
我的情况是,当page2.aspx(小窗口)打开时,page1.aspx永远不允许访问(如果我尝试单击不允许的page1.aspx).如果我关闭了pasge2.aspx(小窗口),则应该只有page1.aspx一次只能访问一个页面.

大家可以帮我吗.

在Advance中感谢

解决方案

通过Jquery这样做更容易,但是我不确定如何使用javascript.一种可行的解决方案是将孩子放在

而不是window.open,它会在父页面本身的div中打开窗口内容,并在单击按钮时使该div可见.当div打开时,找到页面的所有内容并将其禁用. ,请使用 showModalDialog [ disable-parent-window [ Modal-Popup [ My scenario is when page2.aspx(small window) is opened ,page1.aspx never allow to access(if i try to click page1.aspx not allowed).if i closed pasge2.aspx(small window) then only page1.aspx should able to access.at a time only one page should be active.

Can you all help me please.

Thanks in Advance

解决方案

Via Jquery it''s easier to do,but I am not sure how it is possible using javascript.A possible solution is to put the child window contents in a div on parent page itself and make that div visible true when button is clicked.When div opens find all the contents of the page and disable them.


Instead of window.open, use showModalDialog[^]


check this out:

disable-parent-window[^]

or you can use modalpopup
refer this:

Modal-Popup[^]

hope it helps :)


这篇关于加载子页面时禁用父页面的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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