限制对其他打开的浏览器的访问

时间:2014-03-24 07:08:46

标签: c# javascript asp.net .net popupwindow

我需要在点击按钮时打开弹出窗口。这很好用,但弹出窗口在打开的浏览器后面。我想限制对其他打开的浏览器窗口的访问,直到新打开的窗口中的完整事务完成为止。

为了打开一个新窗口,我使用以下代码。

Response.Write(“detailedresults = window.open('NewWindow.aspx','Send Data','left =(screen.width)?(screen.width - 800)/ 2:0,top =(screen .height)?(screen.height - 700)/ 2:0,width = 1000,height = 500,toolbar = no,menubar = no,titlebar = no,location = no,addressbar = no');“); < / p>

1 个答案:

答案 0 :(得分:0)

我会使用模态对话框而不是弹出窗口。其中一个模态对话框对其他可能打开的选项卡的侵入性较小,另外两个,它们通常包括一个覆盖主窗口的半透明覆盖层,以限制您请求的访问。以下是jQuery UI的一个示例:

http://jqueryui.com/dialog/#modal-confirmation